Posting huge data on to JSP page using JSTL tags

Hi,
I have one application where I have to post huge data (approximately 2000 rows of data) into JSP page. I am using JSTL tags and running on Tomcat 5.
It is taking almost 20 to 25 seconds to load the entire page.
Is it the optimal time to load or it could be improved?
Please let me know.
Thanks,
--Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Hi Evnafets,
Thank you for the response.
Here are the tasks I am doing to display the data on JSP.
0. We are running on Tomcat 5 and the memory size is 1024MB (1GB).
1. Getting the data - I am not performing any database queries. The data is stored in the static cache memory. So the server side response is so quick - less than a milli second.
2. Using Java beans to pass data to the presentation layer (JSP).
3. 10 'if' conditions and 2 'for' loops and 2 'choose' statements are being used in the JSP page while displaying the data.
4. Along with the above, there are 4 javascript files are being used.
5. The jsp file size after rendering the data, is aprox. 160 kb
Hope this information helps you to understand the problem.
Thanks,
--Subbu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Render information into a jsp page using netui tags

    Hi,
    Using netui tag in JSP, how can I display data that is stored in a array list or collection object? For example, the collection object has a list of href links. What is the appropriate netui tag that I can use to display the content in the jsp page?
    Any suggestions on this?
    Thanks,
    Latha

    look at the netui:data repeater tags.

  • Insert data into table from JSP page using Entity Beans(EJB 3.0)

    I want to insert data into a database table from JSP page using Entity Beans(EJB 3.0).
    1. I have a table 'FRIENDS', (in Oracle 10g database).
    2. It has two columns, 'NAME' and 'CITY'. Both have datatype strings(varchar2).
    3. Now from a JSP page, having two textfields, 'NAME' and 'CITY', I want to insert data into table 'FRIENDS'.
    4. In between JSP and database is a Entity Bean(EJB 3.0) and a stateless session bean.
    5. I am using JDev as editor.
    Please provide me code ASAP or link with similar example.
    Thank you.
    Anurag

    Hi,
    I am also trying that scenario. So u can
    Post the jsp form data to a Servlet which will act as a Controller.
    In the servlet invoke the business method.
    Similar kind of app is in www.roseindia.net
    Hope this would help u.
    Meanwhile if u get any optimal solution, pls post it.
    Thanks,
    Happy Java Coding.

  • Unable get complete filepath from jsp page using request.getParameter()

    Hey all,
    i am actually trying to get the selected file path value using request.getParameter into the servlet where i will read the (csv or txt) file but i dont get the full path but only the file name(test.txt) not the complete path(C:\\Temp\\test.txt) i selected in JSP page using browse file.
    Output :
    FILE NAME : TEST
    FILE PATH : test.txt
    Error : java.io.FileNotFoundException: test.txt (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileReader.<init>(FileReader.java:55)
    at com.test.TestServlet.processRequest(TestServlet.java:39)
    at com.test.TestServlet.doPost(TestServlet.java:75)
    JSP CODE:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>DEMO SERVLET</title>
    </script>
    </head>
    <body>
    <h2>Hello World!</h2>
    <form name="myform" action="TestServlet" method="POST"
    FILE NAME : <input type="text" name="filename" value="" size="25" /><br><br>
    FILE SELECT : <input type="file" name="myfile" value="" width="25" /><br><br>
    <input type="submit" value="Submit" name="submit" />
    </form>
    </body>
    </html>
    Servlet Code :
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException, FileNotFoundException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    try {
    String filename = request.getParameter("filename");
    out.println(filename);
    String filepath = request.getParameter("myfile");
    out.println(filepath);
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet TestServlet</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Servlet TestServlet at " + request.getContextPath() + "</h1>");
    if (filepath != null) {
    File f = new File(filepath);
    BufferedReader br = new BufferedReader(new FileReader(f));
    String strLine;
    String[] tokens;
    while ((strLine = br.readLine()) != null) {
    tokens = strLine.split(",");
    for (int i = 0; i < tokens.length; i++) {
    out.println("<h1>Servlet TestServlet at " + tokens[i] + "</h1>");
    out.println("----------------");
    out.println("</body>");
    out.println("</html>");
    } finally {
    out.close();
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    Needed Output :
    FILE NAME : TEST
    FILE PATH : C:\\Temp\\test.txt
    Any suggestions Plz??

    As the [HTML specification|http://www.w3.org/TR/html401/interact/forms.html] states, you should be setting the enctype to multipart/form-data to be able to upload files to the server. In the server side, you need to process the multipart/form-data binary stream by parsing the HttpServletRequest#getInputStream(). It is a lot of work to get it to work flawlessly. There are 3rd party API's around which can do that for you, such as [Apache Commons FileUpload|http://commons.apache.org/fileupload] (carefully read the User Guide how to use it).
    You can also consider to use a Filter which makes use of the FileUpload API to preprocess the request so that you can continue writing the servlet code as usual. Here is an example: [http://balusc.blogspot.com/2007/11/multipartfilter.html].

  • Can we create a pivot table of Excel in a JSP page using POI

    Hello,
    I want to know whether we can create a pivot table of excel sheet in a jsp page using POI package from apache.
    thank you.

    Hi Alex,
    Many thanks for replying.
    I followed the link, but unable to get correct output.. I have shared the template earlier. I can share the template once again.
    It would be grateful if you give me share the working template with table of content.

  • Help needed to create a master-detail JSP page using OAF.

    I like to create a master-detail JSP page using OAF. If any help or guide will be appreciate.
    - Kausik

    A Master Detail Page is a basically a game between two VOs(Master and Detail mostly connected through a View Link). You can also have a look at the View Link section in the Dev guide. Page Layouts is one thing which you can take a call yourself.
    Regards
    Sumit

  • Could I use jstl tag in the JSP page of Creator 2 final release?

    I have a JSP page used to work well in Creator 2EA2. The page
    has the following code snippets:
    <c:forEach items="${SessionBean1.webQuery1.details}" var="item">
                                                        <tr>
                                                            <td class="detailKey">
                                                                <c:out value="${item.key}"/>
                                                            </td>
                                                            <td class="detailValue">
                                                                <c:out value="${item.value}"/>
                                                            </td>
                                                        </tr>
                                                    </c:forEach>
    ...Basically, it generates a table columns.
    After migrating to Creator2 final release, a fatal exception is thrown
    when the page is launched :
    Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
    Exception Details: org.apache.jasper.JasperException
      /Page1.jsp(148,132) According to TLD or attribute directive in tag file, attribute items does not accept any expressions
    Possible Source of Error:
       Class Name: org.apache.jasper.compiler.DefaultErrorHandler
       File Name: DefaultErrorHandler.java
       Method Name: jspError
       Line Number: 43
    Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:43)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:414)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:155)
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes Any suggestion, or work around?
    Thanks

    There is something strange in the HTML for you posedt, so I cannot clearly see what you are trying to do in your JSP page. But either of the following kinds of usage would cause this kind of error:
        <h:dropDown ... items="<%= ...some Java expression ...>"/>or
        <h:dropDown ... items="${...some JSP EL expression...}"/>This is because JSF component tags allow neither Java runtime expressions nor JSP EL expressions (at least in JSF 1.1, which is what Creator 2 supports). The answer is to use a JSF EL expression instead, like this:
        <h:dropDown ... items="#{... some EL expression}"/>Craig

  • How to do transactions in jsp pages using Java & MySQL ?

    Hi,
    I'm a newbie..
    I'd like to know "How to do transactions in jsp pages using Java & MySQL ?"
    Platform: Windows XP, Apache Tomcat 5.5, MySQL 5, Java bean without EJB
    what are the the different types of transactions? Differences between them?Pls provide examples?
    Which among them is the best method to implement a transaction?
    Pls help me...
    thnx in advance...

    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

  • How to embed jnlp file into html page using object tag

    hi everyone,
    i have written one jnlp file like this.
    <?xml version="1.0" encoding="utf-8" ?>
    <!-- JNLP file for Demo applicaion -->
    <jnlp spec="1.0+" codebase="http://localhost:9080/base/" href="SampleExample.jnlp">
         <information>
              <title>Demo Application</title>
              <vendor> </vendor>
              <description>Sample Demo Application</description>
              <offline-allowed/>
         </information>
         <security/>
         <resources>
              <j2se version="1.3+" />
              <jar href="common.jar" main="true" download="eager" />
              <jar href="classes12.jar" download="eager" />
              <jar href="toplink.jar" download="eager"/>
              <package name="com.applet.*" part="applet" recursive="true"/>
         </resources>
         <applet-desc name="grid" main-class="com.applet.PriceGrid" width="1000" height="300"/>
    </jnlp>
    i am trying embed that jnlp file using object tag like
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">     
    <PARAM NAME="jnlp" VALUE="http://localhost:9080/base/SampleExample.jnlp">
    </OBJECT>
    but i am not able to load the applet using Web Start.
    Can anyone please help me. This is very Urgent for me.
    Thanks & Regards,
    Shiva.

    thanks.
    i am giving my problem clearly. i have one applet. Previously i am loading the applet in my html page using object tag like this...
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">
    <PARAM NAME="CODE" VALUE="com.adp.base.applet.PriceGrid.class" >
         <PARAM NAME="ARCHIVE" VALUE="common.jar,classes12.jar,toplink.jar" >
         <PARAM NAME="NAME" VALUE="grid" >
    <PARAM NAME="type" VALUE="application/x-java-applet">
    <PARAM NAME= "cache_option" VALUE ="no">
    </OBJECT>
    now what i need to do is
    i need load the applet only first time using web start and when ever the applet code changes in the server i need to reload the applet.
    for that i kept all the applet resources in .jnlp file.i want to cache all the resources which are in .jnlp file and applet must be displayed within a web page within a browser.
    Webstart always open a new application windows.
    I need to run an Applet embedded within a web page within a browser.
    Is there a way to still use Webstart?

  • Use jstl tags in jsf page

    I have h:dataTable in each row of which i'd like to output row data as text, inputfield or link depending on row data type
                        <h:dataTable id="pnlHistory" value="#{UserOrdersBean.orderLineWrappers}" var="wrapper" rendered="#{UserOrdersBean.isBasicUser}"
                                     columnClasses="history_col1, history_col2, history_col3, history_col4, history_col5" width="100%" cellpadding="5" >
                            <h:column>
                                <f:facet name="header">
                                    <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                        <h:outputText value="#{msg.userorders_itemName}">
                                            <f:param value="orderLineWrappers"/>
                                            <f:param value="itemName"/>
                                        </h:outputText>
                                    </h:commandLink>
                                </f:facet>
                                <h:outputText value="#{wrapper.itemName}" styleClass="itemdescription"/>
                            </h:column>
                            <h:column>
                                <f:facet name="header">
                                    <h:commandLink action="doRefresh" actionListener="#{UserOrdersBean.doSort}">
                                        <h:outputText value="#{msg.userorders_data}">
                                            <f:param value="orderLineWrappers"/>
                                            <f:param value="data"/>
                                        </h:outputText>
                                    </h:commandLink>
                                </f:facet>
                                <c_rt:choose>
                                    <c_rt:when test="#{wrapper.type==0}">
                                        <h:outputText value="#{wrapper.data}" styleClass="basic_thin"/>
                                    </c_rt:when>
                                    <c_rt:when test="#{wrapper.type==1}">
                                        <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px"/>
                                    </c_rt:when>
                                    <c_rt:when test="#{wrapper.type==2}">
                                        <h:outputLink value="#{wrapper.data}">
                                            <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
                                        </h:outputLink>
                                    </c_rt:when>
                                </c_rt:choose>
                            </h:column>
                         </h:dataTable>trying to use jstl tags but unsuccessfull. Is it ever possible user jstl tags in jsf tags like listed above

    Replace the c:choose block by<h:outputText value="#{wrapper.data}" styleClass="basic_thin" rendered="#{wrapper.type == 0}" />
    <h:inputText value="#{wrapper.data}" styleClass="basic_thin" style="width:160px" rendered="#{wrapper.type == 1}" />
    <h:outputLink value="#{wrapper.data}" rendered="#{wrapper.type == 2}">
        <h:outputText value="#{msg.userorders_link}" styleClass="basic_thin"/>
    </h:outputLink>

  • How to write this java code in jsp using jstl  tags?

    Can anybody help me on this?
    I dont know how to check the containsKey using jstl tags?
    <%
         LinkedHashMap yearMap     =     (LinkedHashMap)request.getAttribute("yearMap");
         TreeSet nocSet               =     (TreeSet)request.getAttribute("nocSet");
         Iterator     yearMapIt     =     yearMap.keySet().iterator();
         while(yearMapIt.hasNext())
              int yearValue               =     (Integer)yearMapIt.next();
    %>
    <tr>
              <td><%=yearValue%></td>
    <%
              LinkedHashMap monthMap     =     (LinkedHashMap)yearMap.get(yearValue);
              Iterator     nocSetIt     =     nocSet.iterator();
              while(nocSetIt.hasNext())
                   String nCase=(String)nocSetIt.next();
                   if(monthMap.containsKey(nCase))
                        String count     =     (String)monthMap.get(nCase);
    %>
                        <td> <%= count %> </td>
    <%            }
                   else
    %>          
                        <td> 0 </td>     
    <%          
    %>
    </tr>
    <% } %>Edited by: avn_venki on Feb 18, 2008 11:54 PM

    <c:forEach var="yearMap" items="${requestScope.yearMap}">
         <th> <c:out value="${yearMap.key}"/> </th>
    <bean:define id="monthMap" value="${yearMap.value}"/>
    <c:forEach var="nocSet" items="${nocSet}">
    then how to write containsKey using tags??

  • Use JSTL tags for ATG droplets and beans

    Hi,
    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tag
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>

    I am trying to display profile values in a JSON object in jsp.
    <dsp:getvalueof var="json" bean="ProfileFormHandler.ProfileJSON"></dsp:getvalueof>
    <c:out value="${json}" />
    but instead of using dsp tag is there a way for accessing ProfileFormHandler using JSTL tagIn the <dsp:importbean> use var to give an EL variable name to the component you are importing.You can also set its scope attribute to page, request, session, or application with page scope being the default. You can then access it as a page scoped attribute. So this should do:
    <dsp:importbean var="profileFormHandler" bean="/atg/userprofiling/ProfileFormHandler" />
    <c:out value="${pageScope.profileFormHandler.ProfileJSON}" />In case you change the scope in importbean you can accordingly use pageScope, requestScope, sessionScope or applicationScope.
    Also how can we use droplets in ATG like ForEach using JSTL tags only
    <dsp:droplet name="ForEach">
    <dsp:param name="array" param="catalogItems.rootCategories"/>
    <dsp:param name="elementName" value="categoryItem"/>Any ATG droplet is nothing but a servlet which is also a Nucleus component. So essentially you want to call a servlet from JSTL which as such shouldn't be done in a well written script-less JSP. You can probably try to use the droplet as a bean and use JSTL on top of it but since ATG droplets also have different types of parameters like input, output and open so you will have to specially handle those.

  • Is it possible todeclare primitive variable by using JSTL tag

    Hi friends..........
    I have to use jstl tags in my project , so i have to know how to declare primitive variables with jstl tag. Is it possible with <c:set > jstl tag........
    Hope i get the answer...........
    Thanks in advance...............

    JSTL variables are attributes in the page, request, session and application scopes.
    As such, they can only be objects, because you can't store a primitive value as an attribute.
    However you shouldn't need to declare primitive variables. You should hardly need to declare any variables.
    JSTL is not a programming language. It is a language to aid the display of a JSP. Therefore most of its attention is geared towards outputting things, with a much lesser concern on setting them.
    Cheers,
    evnafets

  • Problem in using JSTL tag libs

    Hi there,
    I am trying to use JSTL tag libs in my web app, but i get the following error message:
    org.apache.jasper.JasperException: /index.jsp(22,0) According to TLD or attribute directive in tag file, attribute test does not accept any expressions
    as it might be clear i am using Tomcat and line 22 of the code for index.jsp is:
    <c:if test="${user.role > 0 }">
    Please help my identify whats wrong in there. I suspect that it is because of my web.xml file, but i am not sure.
    thanx in advance,
    Capitan Haddock

    try to use gt instead of >

  • How to iterate dyna validation form using jstl tag

    i have create dyna validation form in struts-config.xml
    <form-bean name="DynaValidationForm"
    type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="username" type="java.lang.String" />
    <form-property name="cityName" type="java.lang.String[]" />
    <form-bean>
    and i want to disply these value on my jsp by usig jstl tag
    <c:forEach var="form" item="${DynaValidatorForm.????????}">
    <c:out value="form.username">
    </c:forEach>
    but problem is item is of collection object And in dyna validation form
    how can i create the collection object or to call this .
    please help me

    posting the same question more than once won't
    increase your chances of getting an answer.
    sometimes nobody knows or no one is interested in
    putting in the time to figure out an answer. your
    question might be one of those.
    %sometimes I get the feeling that I'm actually helping someone do me out of a job.

Maybe you are looking for

  • Repeated failure of LR 2.6 to load in Windows 7

    I have used Lightroom from Version 1 and have recently transferred the programme to a new PC operating under Windows 7 64bit mode. In fact all has been going well for several weeks until today when the programme refused to load properly. After reboot

  • Process blocked sales and distribution documents from the SAPoffice inbox

    Hi, I know VKM1/VKM3 can be used to release order. And SAP help shows we can process blocked sales and distribution documents from the SAPoffice inbox. Could anyone tell me how? I can use output type KRML to send a mail to SAPoffice inbox, but don't

  • How to change MP4 in MP3 ?

    probably i make a mistake , music is in M , or i need MP3 to read with a usb kee

  • How can I download the Mozilla Firefox version 1.5 or 2?

    I need the older versions I mention above for a program I want to use on my mac book pro. Those are currently the only versions supported by the website. How can I obtain them through your site? All I see are the newer 5.0 versions

  • Dreamweaver 8, Vista 64 - login info keeps getting deleted

    I'm using Dreamweaver 8 on Vista 64, but am having a strange problem - the saved login info (FTP username and password) are deleted for whatever site definition happens to be selected at the time I close Dreamweaver. I have to go to Manage Sites and