Implemented pagination using JSTL !

Hi,
I have implemented pagination using JSTL and uploaded the code at the following website
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4718&lngWId=2Please send feedback on improving the code if any to [email protected]
It can be used for doing Pagination using JSTL.
Change the query as required in pagination.jsp
Rows to be displayed per page can be changed by changing the variable rowsPerPage in printResult.jsp.

Congrats! Atleast you are posting a solution.
Rich

Similar Messages

  • Using rownum in EJB-QL ..Pagination using CMP 2.1

    Hi ,
    Hope this is the right forum .. rather than JDBC .
    My requirement is to implement Pagination using EJB2.1 on weblogic with Oracle DB. This is for an application which is quite old system and is not ready yet to be migrated to EJB3.0. So we are struck with EJB2.1 at the moment.
    We are using EJB-QL to get Search result and now need to add Pagination logic in it. I can find weblogic.ejb.PreparedQuery.setMaxElements() API to specify the upper limit but what am looking for is a lower limit ..somthing like setFirstRow() ..
    Can it be done using CMP Entity Bean 2.1 .. EJBQL or someother way ?
    I have the sql for pagination but am not sucessful in translating it to EJB-QL
    select * from
    select /*+ FIRST_ROWS(n) */ a.*, ROWNUM rnum from
    (your_query_goes_here) a
    where ROWNUM <=:MAX_ROW_TO_FETCH
    where rnum >= :MIN_ROW_TO_FETCH;
    Thanks in advance ! I hope I get a solution soon ..
    Edited to get some answers !!!
    is it possible to use rownum in EJBQL ? I know rownum is specific to Oracle and my application will stay with Oracle. I get this exception
    "EJB QL compilation encountered error: [EJB:013042]The Identifier 'rownum' is neither a cmp-field nor a cmr-field. Re-examine your query."
    Edited by: user11305835 on Oct 12, 2009 10:48 PM

    Beevin
      Both two are not even validated,
      but with the first one as select max(c.id) from customer as c , in this case it is validated but while deploying it is error as , object must be return
      But when i saw  the ejb2.1 specification we can write this type of queries also ?
      Is it problem with was any thing
    Regards
    Somaraju

  • Can you set pager attribute using jstl c:out tag?

    I am trying to use the pager tag library from jsptags.com. The pager tag has a maxPageItems attribute. I want maxPageItems to be variable. I also want to use the jstl instead of scriptlets and expressions. Instead of writing
    <pg:pager
        maxPageItems="<%= myPageItems %>" >I want to write
    <pg:pager
        maxPageItems="<c:out value='myPageItems'/>">When I do this I get a java.lang.NumberFormatException: for input string: ""
    I think this issue is documented on the jsptags website. So maybe I have no choice but to use the expression format. I guess I should also mention that I am using jstl 1.1 and jsp 1.2 (implemented in tomcat 4.1.27)
    Has anyone tried this and had success?
    Did I provide enough information?

    Sorry, but you can't use tags as attributes to other tags (where would it end?)
    You're stuck with using <%= %> syntax.

  • Pagination using AJAX

    i need to implement pagination in my jsp page.
    is it possible to create a table in the page and upon clicking the next page,retrieve only the sufficient data from the server using AJAX?
    my idea is to retrive data in xml format from the database and use AJAX to display it in the table.will it be possible?

    I think you can do it only using JSF DataTable instead Ajax.

  • How to use jstl in weblogic 8.1

    I tried to use JSTL in my jsp file and I add
              <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> at the top line. But the server reported
              java.lang.NoClassDefFoundError: javax/servlet/jsp/el/VariableResolver
              how to solve this problem?

    WebLogic 8.1 supports JSP 1.2, which doesn't natively implement the JSTL or the expression language. If you download the Jakarta Taglibs implementation of the JSTL (for JSP 1.2, not JSP 2.0), then you can use the JSTL taglib as a normal taglib. Note that this doesn't give you the ability to use the other JSP 2.0 tag features, like using the expression language in body content.
              Make sure that you use the uri value specified in the tld that you're using. I believe the values are different between the JSP 1.2 and JSP 2.0 versions.

  • Using JSTL on Weblogic 8.1 SP2

              I'm trying to create a web app running on Weblogic 8.1 SP2 that uses JSTL tags.
              I've downloaded the Apache 1.0.5 Reference Implementation of the JSTL 1.0 spec,
              but I can't get the sample web-app (standard-examples.war) to work correctly.
              When I go to the "General Purpose Tag Examples" and try to view the Out example
              JSP, I get a large exception saying that java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
              (full stack trace at bottom). This also happens when I try to view the JSP source
              and pretty much any other example. I found that the German example in "I18N &
              Formatting" works, but running the Italian example gives a new exception:
              Parsing of JSP File '/format/ItalianLocale.jsp' failed:
              /format/ItalianLocale.jsp(12): for tag 'message', property 'bundle' of tag handler
              class 'org.apache.taglibs.standard.tag.rt.fmt.MessageTag', the value must be a
              runtime expression "<%=...%>", since we cannot do an automatic conversion from
              "${itBundle}" to type 'javax.servlet.jsp.jstl.fmt.LocalizationContext' and there
              is no custom property editor for that type
              probably occurred due to an error in /format/ItalianLocale.jsp line 12:
              <fmt:message key="greetingMorning" bundle="${itBundle}"/>
              I can, however, get this to work on Tomcat 5.0. Has any else had this problem?
              Is there something that I'm doing incorrectly?
              Thanks in advance.
              -Kelvin
              ===========================================================
              java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
                   at java.lang.Class.getDeclaredMethods0(Native Method)
                   at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
                   at java.lang.Class.getDeclaredMethods(Class.java:1114)
                   at java.beans.Introspector$1.run(Introspector.java:1103)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1101)
                   at java.beans.Introspector.getTargetMethodInfo(Introspector.java:966)
                   at java.beans.Introspector.getBeanInfo(Introspector.java:370)
                   at java.beans.Introspector.getBeanInfo(Introspector.java:207)
                   at java.beans.Introspector.(Introspector.java:351)
                   at java.beans.Introspector.getBeanInfo(Introspector.java:207)
                   at java.beans.Introspector.getBeanInfo(Introspector.java:193)
                   at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
                   at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
                   at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292)
                   at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
                   at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
                   at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
                   at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
                   at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
                   at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
                   at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
                   at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
                   at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
                   at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
                   at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
                   at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
                   at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
                   at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:367)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:223)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:172)
                   at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:518)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:362)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              

              I'm having the same problem, did you find a solution?
              "Kelvin" <[email protected]> wrote:
              >
              >I'm trying to create a web app running on Weblogic 8.1 SP2 that uses
              >JSTL tags.
              > I've downloaded the Apache 1.0.5 Reference Implementation of the JSTL
              >1.0 spec,
              >but I can't get the sample web-app (standard-examples.war) to work correctly.
              >
              >When I go to the "General Purpose Tag Examples" and try to view the Out
              >example
              >JSP, I get a large exception saying that java.lang.NoClassDefFoundError:
              >javax/servlet/jsp/el/ELException
              >(full stack trace at bottom). This also happens when I try to view the
              >JSP source
              >and pretty much any other example. I found that the German example in
              >"I18N &
              >Formatting" works, but running the Italian example gives a new exception:
              >
              >Parsing of JSP File '/format/ItalianLocale.jsp' failed:
              >--------------------------------------------------------------------------------
              > /format/ItalianLocale.jsp(12): for tag 'message', property 'bundle'
              >of tag handler
              >class 'org.apache.taglibs.standard.tag.rt.fmt.MessageTag', the value
              >must be a
              >runtime expression "<%=...%>", since we cannot do an automatic conversion
              >from
              >"${itBundle}" to type 'javax.servlet.jsp.jstl.fmt.LocalizationContext'
              >and there
              >is no custom property editor for that type
              >probably occurred due to an error in /format/ItalianLocale.jsp line 12:
              ><fmt:message key="greetingMorning" bundle="${itBundle}"/>
              >
              >
              >I can, however, get this to work on Tomcat 5.0. Has any else had this
              >problem?
              > Is there something that I'm doing incorrectly?
              >
              >
              >Thanks in advance.
              >-Kelvin
              >
              >===========================================================
              >java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
              >     at java.lang.Class.getDeclaredMethods0(Native Method)
              >     at java.lang.Class.privateGetDeclaredMethods(Class.java:1627)
              >     at java.lang.Class.getDeclaredMethods(Class.java:1114)
              >     at java.beans.Introspector$1.run(Introspector.java:1103)
              >     at java.security.AccessController.doPrivileged(Native Method)
              >     at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1101)
              >     at java.beans.Introspector.getTargetMethodInfo(Introspector.java:966)
              >     at java.beans.Introspector.getBeanInfo(Introspector.java:370)
              >     at java.beans.Introspector.getBeanInfo(Introspector.java:207)
              >     at java.beans.Introspector.(Introspector.java:351)
              >     at java.beans.Introspector.getBeanInfo(Introspector.java:207)
              >     at java.beans.Introspector.getBeanInfo(Introspector.java:193)
              >     at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
              >     at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
              >     at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:292)
              >     at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
              >     at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
              >     at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
              >     at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
              >     at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
              >     at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
              >     at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
              >     at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
              >     at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
              >     at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
              >     at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
              >     at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
              >     at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
              >     at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:367)
              >     at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:223)
              >     at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:172)
              >     at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:518)
              >     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:362)
              >     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
              >     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
              >     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
              >     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
              >     at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
              >     at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
              >     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              >     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              

  • Pagination using pager tag library (logical groupings)

    I'm currently trying to achieve pagination using the pager tag library provided by jsptags.com.
    Instead of the usual breaking up the records into a fix number to be displayed per page, I need to display these records by grouping per page. E.g., my records are grouped by countries, so each group varies in size.
    I would not be accessing the database directly from the JSP page, in fact, the JSP page will get a collection of the objects that I want to display per page.
    Has anyone done anything like this before? Would appreciate very much if you could share with me how you implement this.
    Thanks!

    Hi there,
    I am wondering if you found the solution for your question with paging in JSP. if so i will really appreciate if you can let me know, how you did it. I am using Pager tag lib from JSPTags as well and i used collection object to iterate through. But i have some problems. I am wondeinf if you can help me with this
    Thanks
    Vik

  • Pagination using table growing property and multi-select table issues

    Hi,
    We're using the growing property on a table, thus the pagination is handled by the control it self.
    However, if we want to update some item in the table, in order to get those details reflected, we're refreshing the model, which is performance intensive.
    Is there any way we can update the UI only without creating any UI inconsistencies?
    Another question is that, is there any way to disbale the checkbox on the table items, based on some property from the backend. we tried to use editable property, but it hides the entire row.
    We need to disable the checkbox on the rows for particular items?
    Also, I need to know any resources on the mobile library where I can find the CSS related documentaion.
    Like we need to create a icon + text structure, which controls should be ideal to use? I have used
    <HBox><Icon src="abc"/><Text text="abc"/></Hbox>, but it creates alignment issues. Any ideas here?
    Thanks!
    Aamir

    855354 wrote:
    We are implementing pagination in our application and comparing the scrollable result set approach with using ROWNUM provided by oracle.The rownum approach scales better.
    Does this literrally mean that Oracle stores all the records in client-side memory cache? Well if it is scrollable it has to store all the rows somewhere, that is the disadvantage.
    Can we use fetchSize attribute or any other work around to limit the number of records in client-side memory?No. If you want that behavior that is how the rownum approach works.
    In the above case, when MAX_ROW_TO_FETCH is a large number (say 50000), then oracle will have to create a temporary table in memory with all the 50000 records and then will fetch from that table required records as per MIN_ROW_TO_FETCH.No, that is not how it works, where did you read that?
    In this case, reading rest of the records and storing in temporary in memory table will impact performance. Is my understanding correct or i am missing something here?Your understanding is not correct. The rownum approach does not work the way you think and behaves more like the way you want the scrollable result set to work.

  • Implementing pagination

    Hi,
    Pls suggest for implementing pagination with af:table.
    I referred the link http://wiki.apache.org/myfaces/WorkingWithLargeTables . It looks like too many changes required.
    We have to implement pagination for 5 tables in our app.
    Thanks
    Tilak

    Tilak,
    You don't indicate what you use for your model layer (the link you posted describes how to make a fetch-on-demand model). If you are using ADF Business Components as your model layer, then any of tr:table, af:table (10g - with paging), af:table (11g - with scrolling) will have this fetch-on-demand automatically.
    If you are building your own data model layer from scratch, then the link you provided is a great start. Yes, it's a lot of work, which is an excellent reason to consider using a framework, such as ADF, where someone (Oracle) has already done this work for you.
    John

  • Error running Portlet that uses JSTL

    Anyone have any issues running a JSR 168 Portlet in Sun Portal Server that is running on Sun Web Server 7.0 update 2? This same portlet runs fine in the Portlet Driver application running on Glassfish. Seems to be an issue in the servlet/JSP implementation on Sun Web Server.
    service-j2ee reports: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
    java.lang.NoSuchMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
    at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:140)
    at org.apache.jsp.jspf.summary_jspf._jspx_meth_c_set_0(summary_jspf.java:168)
    at org.apache.jsp.jspf.summary_jspf._jspService(summary_jspf.java:110)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:359)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:311)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:917)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:391)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:297)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:178)
    at mil.army.usaac.portlet.onthefloor.LogBackFilter.doFilter(LogBackFilter.java:43)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:178)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:270)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:241)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:182)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:160)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at com.sun.webserver.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:149)
    at com.sun.webserver.connector.nsapi.NSAPIConnector.service(NSAPIConnector.java:995)

    Try bundling JSTL and Standard jars in the webapp and see whether the issue is resolved.
    Else write a simple webapp that uses JSTL and deploy on Sun Web Server 7.0 update 2 and see whether you see the same exception. You can post the issue to WebServer forum.
    Regards,
    Deepak

  • Hw can i get arabic support in oracleAS using jstl: showing '?????' symbols

    Hello All,
    I am using OracleAS for portal deployment and portlets UI constructed by using jstl.
    i have used spring portlet jstl for the jsp pages.
    when i am trying to change the language, it is showing '?????' symbols.
    I have used correct unicode. i tested in pluto portal server. when i deployed in oracleAS,
    for english not a problem. for arabic it is showing as '????'.
    i have used this code to get arabic in pluto. same code i used. i am getting error.
    <c:set target="${pageContext.response}" property="characterEncoding" value="UTF-8" />
    <fmt:setLocale value="ar" />
    <fmt:requestEncoding value="UTF-8" />
    i know it is not setting charector encoding.
    i tried some other too like:
    <head>
    <META http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    </head>
    and
    <%@ page pageEncoding="UTF-8" %>
    No improvement. please help me out of this.
    how can i get arabic support in oracle AS by using jstl?
    Thanks,
    Arun

    Only Apple Account Security could help at this point. You can try calling Apple Support in Canada - you'll have to find one of the several ways, such as Skype, to call an 800 number from outside of the relevant country - and ask for Account Security and see if they can help. Or you can find a friend who speaks Chinese and ask them to help you talk to Apple Support in China. There are really no other options that I know of.
    Note, by the way, that these are user-to-user support forums. You aren't speaking with Apple when you post here.
    Regards.

  • How can i display the values in the vector in a jsp using jstl

    in a task i am recieving a vector in a jsp... how can i display those vector values in the jsp using jstl.... plz help me
    thanks in advance

    <%
    here you got vector say; v
    pagecontext.setAttribute("varname",v);
    %>
    <c:forEach var="i" items="${varname}">
    <c:out value="${i}">
    </c:forEach>

  • How do I use jstl  to insert  links that passes sql info?

    Hi all,
    I'm using JSTL with sql and I want to create a link for every row so that the link would also contain the item in the first column of every row. But I keep getting stuck at saving the value. This is what I've tried:
    <c:set var="myName" value="test" scope="page"/>
    <tr>
    <c:forEach var="row" items="${name.rowsByIndex}">
         <tr>
    <c:forEach var="column" items="${row}">
         <c:if test="row =='uname'">
              <c:set var="myName" value="${column}"/>
         </c:if>
         <td>myName=<c:out value="${pageScope.myName}"/>"> <c:out value="${column}"/> </td>
    </c:forEach>
    </tr>
    </c:forEach>
    I either get a link of "edit.jsp?uName=$myName".
    Any ideas would be appreciated.
    Chris

    Introducing the <c:url> and <c:param> tags!
    <c:url value="edit.jsp">
      <c:param name="uName" value="${myName}"/>
    </c:url>Why the nested loops? When does row=='uname'? Could that ever occur?
    If you are after a specific column why not have one loop over ${name.rows} and get ${row.uname}?
    What server are you using?
    What version of JSTL?
    What is the taglib import you have made?

  • Accessing the value in option Tag in html using JSTL

    Hi,
    Following is my code
    <select>
    <option value="1">one </option>
    <option value="2">Two</option>
    </select>
    Now, if I select two from the option, i need to get the value 2, using JSTL( JSP standard Tag Library).
    Can someone help me out.
    Thanks
    Achillies.

    You need to give the "select" component a name to submit under.
    <select name="yourChoice">
      <option value="1">one </option>
      <option value="2">Two</option>
    </select>When you submit this page, it will submit a parameter like yourChoice=2.
    In a servlet you retrieve this with request.getParameter("yourChoice");
    In JSTL/EL, you can use the param map: ${param.yourChoice}

  • Problem while parsing xmlString in jsp using JSTL

    HI, I am not able to display data in jsp page that I have stored in string variable in XML form.
    I want to print xmlString data in jsp using jstl.
    probably i might have to parse it but i don't have idea . Can any one help me PLZ??

    I managed the code but getting following error
    org.apache.jasper.JasperException: javax.servlet.jsp.JspException: Content is not allowed in prolog.
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Content is not allowed in prolog.
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.xml.test_jsp._jspService(test_jsp.java:106)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
         com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
         org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
         org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
         org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
         org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
         org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
         org.apache.jsp.xml.test_jsp._jspx_meth_x_parse_0(test_jsp.java:168)
         org.apache.jsp.xml.test_jsp._jspService(test_jsp.java:82)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Maybe you are looking for

  • Cannot login to airport extreme router settings

    Hi I've recently moved from an iiNet ADSL2+ service to NBN, in Australia. Everything has worked perfectly fine, and continues to, with relation to internet connectivity. I've just signed up for an iiNet VOIP NetPhone service, and purchased a Gigaset

  • Inbound delivery creation in WM - mapping to process type 1011 in EWM

    Hi All, I am new to EWM and have to configure handling units for picking and putaway in EWM. I am creating an inbound delivery w.r.t Purchase order in WM and passing it to EWM.  During the warehouse order creation I am packing the materials in a pack

  • Is there any harm in using colspan="1000"

    Hi, i want to know that is there any harm in using colspan="any big number" in my <TD> tag even if no row in table contains more than suppose 1 - 20 columns, i just want my current <TD > to span the whole available width of table, whatever may be the

  • Images on Firefox come out pixelated

    Hi, For some reason, Firefox on my MacBook Air displays pixelated images. When I access the same site on Google Chrome, the images come out with good resolution. I tried looking for the settings to correct this but cannot seem to find it. I do enjoy

  • Oracle Application Server JMS Library files

    Hi, What are the JMS library files that are used by Oracle with the Application version 10.1.2 and 10.1.3? In which folder of the Application Server install, these library files would be available? Do they differ by JDK version? Please let me know th