Display date in jsp. using struts, JSTL

want to display today's date in format October 18, 2006
how to get today's date and how to display it in jsp?
I am using struts framwork and JSTL tags in my JSP.
Thanks.

rizza_99 wrote:
The page underlines {<fmt:formatDate value="${now}" type="both" dateStyle="long" />} says
attributte value doesn't accept any expressionsWait, you said "the page underlines"?? So you're using an IDE? Are you sure that it a JSTL problem and not an IDE problem? Ignore the IDE and just execute the code. Does it work without any compilation errors or runtime exceptions? If so, then there's a problem in the IDE.

Similar Messages

  • [b]Data Grid in jsp using Struts [/b]

    I need to develop a data grid in JSP using struts .
    I am using Tomcat web server , Intellij IDEA IDE.
    If any one has code, please sent it.
    Thanks in Advance.

    hi,
    Use Struts-Layout datagrid framework to full fill your needs
    Related Topic link
    here is the clear documentation for your topic
    http://struts.application-servers.com/datagrid/index.html
    here is the download link
    (Struts-Layout datagrid framework)
    http://deltha.uh.cu/java/docs/struts-layout-1.0-docs/download.html
    related discuss
    http://forum.java.sun.com/thread.jspa?threadID=5202989&messageID=9811082

  • Displaying Hashmap values in JSP using struts taglib

    Please can any one provide me the solution for the below query,
    I have stored hasmap key as string and value as arraylist, can any one suggest how to display the hashmap values(arraylist) in table format in jsp using struts taglib.
                             HashMap hsMap=new HashMap();
                             ArrayList arrList = new ArrayList();
                             arrList.add("filesize");
                             arrList.add("filelength");
                              hsMap.put("filename",arrList);
               In jsp i want to display filename and filesize in table format.

    Read this documentation:
    http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-logic.html#iterate

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • Display data in smartforms using report

    hi,
    i want to display data from smartform using report.
    i have a preview buttons in report when i select preview buttons displays in smarts
    regards
    amit

    design the smartform as per ur need and get  the function module generated by smartform and pass it to ur report programas below..
    case sy-ucomm.
    when 'smartform'.
    pass the f.m that is generated by system in smartforms
           CALL FUNCTION '/1BCDWB/SF00000265'
        EXPORTING
        ARCHIVE_INDEX              =
        ARCHIVE_INDEX_TAB          =
        ARCHIVE_PARAMETERS         =
        CONTROL_PARAMETERS         =
        MAIL_APPL_OBJ              =
        MAIL_RECIPIENT             =
        MAIL_SENDER                =
        OUTPUT_OPTIONS             =
        USER_SETTINGS              = 'X'
          DATE_L                     = s_fkdat-low
          DATE_H                     = s_fkdat-high
          PLANT_L                    = s_werks-low
          PLANT_H                    = s_werks-high
      IMPORTING
        DOCUMENT_OUTPUT_INFO       =
        JOB_OUTPUT_INFO            =
        JOB_OUTPUT_OPTIONS         =
        TABLES
          IFINAL                     = ifinal1[]
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endcase.

  • Displaying data in xml using jsp

    how do we display data in database from jsp using xlst format in xml browser view

    how do we display data in database from jsp using xlst
    format in xml browser viewRefer this Post
    http://forum.java.sun.com/thread.jsp?forum=45&thread=482077&tstart=0&trange=15
    -Regards
    Manikantan

  • Displaying  list of  items , in  a jsp , using STRUTS--Correct approach

    I have a requiremnet tht on click of a button , a list of items should be displayed on a jsp page , so tht a user can select items from tht list.
    But the problem is tht , the list is very large(Conatins 1500 record).
    So wht approach should i adopt.
    One approach is tht , i have a link on my main.jsp , where user has a link (addItems) , and on clicking this link , another page(Items.jsp), opens up , where i dispaly the list of users , and user here can select multiple items , and then those items will be shown in Main.jsp.
    Is this appraoch correct,
    also plz tell me how can i incorporate previous and next functionality , so tht 20 records per page are shown
    Can anyone tell me how 2 go abt it.
    I m using STRUTS , and weblogic.

    Hiiii
    When u want2 add textboxes dynamically,
    then declare ur proprerty in action form as of type String[]
    <form-bean
    name="userForm"
    type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="name" type="java.lang.String[]"/>
    <form-bean>
    When u add textboxes dynamically , and if the textboxes name is same as that in form bean,
    then automatically this form bean property gets populated.
    If u require further assistance do tell me

  • How to display PDF in JSP using Iframe

    Hi All,
    I am using Struts 2. I am building my file in ActionClass with seperate Method like getGeneratedPDF() in which, I am setting header of response and writing into PDF.
    This method will be called from JSP by this way
    s:property value="getGeneratedPDF()" />
    But It displayed Junk Characters , and this PDF is not static (already Generated). It is generated and build on Fly.
    I have 2 questions 1 -- How to display PDF in JSP in proper way without Junk Character in it?
    questions 2 -- How to display it in Iframe?
    Please help me , If you know the solution.
    Thanks in Advance,
    Jimmy

    jamy_26 wrote:
    But It displayed Junk Characters , and this PDF is not static (already Generated). It is generated and build on Fly.A PDF file is a binary file, not a text file, and you're trying to display it as String. Of course you would get "junk characters". Have you ever tried opening a binary file (pdf, doc, jpg, xls, etc) using a text editor like Notepad?
    I have 2 questions 1 -- How to display PDF in JSP in proper way without Junk Character in it?Display it as binary stream, not as text stream. You can display it standalone, just let the link/form/addressbar URL point to some Servlet which writes the InputStream of the PDF file to the OutputStream of the response, along with a correct set of response headers (at least content-type, content-disposition and content-length), so that the browser can open it in the correct application (which is usually Acrobat Reader). If you want to embed the PDF file in a JSP, then one of the ways is indeed using the HTML <iframe> tag.
    questions 2 -- How to display it in Iframe? Just let the iframe URL point to the aforementioned Servlet.
    You can find here an example of a generic file servlet, you may find it useful to get the idea how to do it: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • Approaches for Prepopulating dropdowns in Jsp using struts.

    Hi,
    I'm having a functionality working of pre-populating dropdowns using struts like:
    ArrayList list = getRoles(); //This method will return list of roles
    request.setAttribute("roles", list);
    By setting this collection in the request it will be availbel to <html:select and <html:options> tags for pre-populating. My question here is do we need to set the list (that is to be displayed in the JSP) in request scope deliberately, or there are other better approaches as well to do the same, like using expression language and accessing the method directly.
    Thanks,
    Prashant.

    Why dont you use ActionForm.
    declare a private variable
    //variable
    private List roles=null;
    //methods
    public List getRoles();
    public void setRoles(List roles);and in ActionClass
    ArrayList list = getRoles(); //This method will return list of roles
    form.setRoles(list);This collection object will be available in the jsp forwarded from that action in the scope specified in the struts-config.
    then use
    <html:select>
    <html:options collection="roles" labelProperty="name"     property="id" />
    </html:select>

  • Problem in showing data on page using struts

    hi,iam new to struts framework,
    iam trying to display data fetched from database in a page contaning multiple textfields,when i try to call this page iam getting
    "javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null"
    execption.can anybody tell me what can be the problem.
    action tag is
    <action path="/getdetails" type="com.dpsl.dxdam.participant.actions.ParticipantAction" name="ParticipantForm" scope="request" input="/jsp/participant/participantdetails.jsp">
    <forward name="success" path="/jsp/participant/participantdetails.jsp"/>
    </action>
    iam setting the values in textfield by
    <html:text property="participantpolicyID"/>
    iam calling the page by url
    http://localhost:8080/dxdams1.0/getdetails.do?action=getdetails
    what can be the problem ,please guide me

    Make sure all your text properties are correctly represented in your form bean.
    Clems

  • Help with displaying errors in jsp using html:errors/

    Here is my problem.
    In my overridden ActionForm.validate() method, i am returning ActionErrors (as required). When there are input errors in my form submission, the control goes back to the JSP page i used to read user input (so far so good). The JSP page is rendered fine for taking input for the second time but no errors are displayed although i am using the tag <html:errors/>
    I tried to find the org.apache.struts.action.ERROR in my request attributes and it is there with the size of 1 (because i am reporting one error, in my sample run). Any idea why <html:errors/> won't display the errors even though they are there??? Here is what i am doing in my ActionForm class:
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if (this.email == null || this.email.length() < 1) {
    errors.add("username", new ActionError
    ("error.username.required"));
    return errors;
    Any help is appreciated.

    First of all, thanks for taking time to look at my message. Here is how my message-resources tag look like in struts-config.xml file:
    <message-resources parameter="ApplicationResources"/>
    The "ApplicationResources.properties" file exist in the WEB-INF folder of my application and following are the entries in that file that i think are relevant:
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.footer=</ul><hr>
    error.username.required=<li>Username is required</li>
    Is there anything else needed to go into resource file? Or should i put my resource file somewhere else?

  • Display data in EP using BAPI-    BAPI_PO_GETITEMSREL

    hi all!!
    I need to display data in EP from R/3 and i'm using a BAPI mentioned in subject for it ,can anybody provide the step by step instructions.
    eagerly waitin
    sachin

    Hi Sachin,
    Go through the step by step tutorial for the WebDynpro application creation from following link.
    You can then create your application in Netweaver development studio Webdynpro.
    Link:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/content.htm
    Regards,
    Tejas

  • Display data to matrix using LoadFromDataSource

    Hello all,
    I tried to display data to matrix.
    I used matrix object's LoadFromDatasouce.
    But it didn't display data at all.
    Pls help me!!
    creationPackage.ObjectType = "EVOSS_BUSTR"      
    creationPackage.UniqueID = "TEST
    creationPackage.FormType = "TEST"
    creationPackage.BorderStyle =  SAPbouiCOM.BoFormTypes.ft_Fixed
    Set oForm = SBO_Application.Forms.AddEx(creationPackage)
    sTableName = "@EVOSS_BUSTR"   
        oForm.Title = sTitle
        oForm.Height = 300
        oForm.Width = 350
        oForm.DataSources.DBDataSources.Add ("sTableName")
        Set oItem = oForm.Items.Add("1", it_BUTTON)
        oItem.Left = 5
        oItem.Width = 65
        oItem.Top = 240
        oItem.Height = 19
        Set oButton = oItem.Specific
        oButton.Type = bt_Caption
        Set oItem = oForm.Items.Add("2", it_BUTTON)
        oItem.Left = 75
        oItem.Width = 65
        oItem.Top = 240
        oItem.Height = 19
        Set oButton = oItem.Specific
        oButton.Type = bt_Caption
        'Adding a matrix
        Set oItem = oForm.Items.Add("TEST, it_MATRIX)
        oItem.Left = 5
        oItem.Width = 340
        oItem.Top = 10
        oItem.Height = 200
        oItem.AffectsFormMode = True
        Set oMatrix = oItem.Specific
        Set oColumns = oMatrix.Columns
        'Adding col 1
        Set oColumn = oColumns.Add("ColNb", it_EDIT)
        oColumn.TitleObject.Caption = "#"
        oColumn.Width = 20
        oColumn.Editable = False
        'oColumn.DataBind.SetBound True, "", "#"
        'Adding col 2
        Set oColumn = oColumns.Add("EVOSS_Code", it_EDIT)
        oColumn.TitleObject.Caption = "Code"
        oColumn.Width = 80
        oColumn.Editable = True
        oColumn.DataBind.SetBound True, sTableName, "Code"
        'Adding col 3
        Set oColumn = oColumns.Add("EVOSS_Name", it_EDIT)
        oColumn.TitleObject.Caption = "Name"
        oColumn.Width = 220
        oColumn.Editable = True
        oColumn.DataBind.SetBound True, sTableName, "Name"
        oMatrix.AddRow
        Set oColumn = oMatrix.Columns.Item("EVOSS_Code")
        Set eItemCode = oColumn.Cells.Item(1).Specific
    '   oForm.Mode = fm_FIND_MODE
    '   oForm.DataBrowser.BrowseBy = "EVOSS_Code"
        'oMatrix.SelectionMode = ms_None
         oForm.Visible = True
         add_line = True
         oMatrix.LoadFromDataSource

    Hello.
    For load a data to a matrix you need call a Query method of the dbdatasource to obtain data from the database.
    By.

  • Display PDF in JSP using a content selector

    Hello,
    We are running on WLP 8.1 sp4. We have documents (Word and PDF) stored in the Weblogic Portal content management system. We have made several tries, but are unsuccessful in rendering a PDF inside a JSP using Content Selector tags. We can get a link to display and other properties of the content type, but we have not been able to show the actual binary property of the PDF. Has anyone climbed this mountain before, any help will be greatly appreciated!
    Rob
    The following displays links to the documents, but not the actual document.
    <pz:contentSelector rule="novel_flu_db_archived_reports"
    id="fluArchiveQuery" />
    <utility:notNull item="<%=fluArchiveQuery%>">
    <utility:forEachInArray array="<%=fluArchiveQuery%>" id="docA" >
    <cm:getProperty id="docA" name="file" conversionType="html" />
    <ad:render id="docA" />
    </utility:forEachInArray>
    </utility:notNull>

    Thank you for the response.
    Option 1 - would be great, but I am having problems getting this to work (see thread "Problem accessing a file stored in the CMS from link on JSP")
    Option 2 - I need to look into, as we need to be compliant with Accessibility standards and I can't remember if IFrames pose any problems for screen readers.
    Option 3 - introduces an additional step to the work flow, we would like to avoid extra work (if possible)
    In looking through the archives, there was mention of a "stand alone" JSP which was not under a Portlet or the Portal. The PDF was displayed in the stand alone JSP where the mime type was altered to PDF. Would this be an option?
    -Rob

  • Dynamic Textboxes in JSP using struts

    Hi all
    I'm using JSP and Struts framework. I have two buttons Add row and delete row.(not submit buttons) on click i need to either generate or delete a row of textboxes. I able to do the same using javascript but the tag in that case is <input..>(normal HTML) and not <html:text> tag of struts.. Can i use the struts tag in jsp?? I tried but err... So any suggestions?
    A sample code would be of great help.. Im still a beginner in this ocean of Java!
    cya

    If the add/delete row buttons run in javascript, then you have to use the standard <input> tags.
    The struts <html:text> tag is a JSP tag that just generates an <input> at the end of the day anyway (filling in the attributes automatically though)
    As long as you name the controls consistent with what would have been produced by the struts tag, it should work perfectly well.

Maybe you are looking for

  • Issue with Dragging a 3D Layer

    There seem to at least three ways to get an external 3D model into a document: 1. Open the model file itself. 2. New Layer from 3D File. 3. Drag a 3D layer from another document. The third way has a problem associated with it that doesn't seem to be

  • Can't open a Pages file with Pages

    I have someone sending me a file from a new version of Pages than I have. The files won't open, is there a work around?

  • Match code result not copied in the transaction

    Hi there, I had a request to check the following problem : in transaction VF02 (billing doc change), when finding a document through custom match code using the reference field, double clicking on the document in the result box does not copy the docu

  • Creating an NEW version of an existing web site

    I thought i was being smart, so i selected my existing fully operational web site in iWeb and then changed the Site Name and Published it to a local folder (different to the original site). This is OK I can make changes to this new site, BUT how do i

  • Clonning of the EPM Suit from Production to Training Server.

    Hi Gurus/experts, Quick one - Some xwz Company has already Implemented EPM Suit 11.1.2.1 , HFM,HPM,Essbase modules. They are having the Production and Test Enviroment of the Hyperion running smoothly. Now we have been given the contract to do the tra