JSTL problems

Hi,
          Just started using WebLogic 10, and have a problem using JSTL in my JSP pages.
          After deployment with no errors, I get the following error when I try to access the .jsp page... I have tried to put the .jar files JSTL needs in the domains \lib folder, and also included it in the .war file in the WEB-INF\lib folder. The .war file is working on the Sun appserver.
          No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

You're certain that you have the correct JSTL jars in WEB-INF/lib? There is a set of versions used with JSP 1.2, and a set of versions used with JSP 2.0. You need the newer versions. Typically, version 1.1.x is used with JSP 2.0. You could verify this by opening up the jstl.jar file and the enclosed TLD file and verifying that the URI in that file matches the URI that you're using.
          You could try setting "prefer-web-inf-classes" to true in your weblogic.xml.
          This probably isn't relevant, but are you referencing the Servlet 2.4 schema in your web.xml, as opposed to the Servlet 2.3 DTD?

Similar Messages

  • JSTL problem with JSP

    Hi,
    I am developing enterprise application using jboss portlets, ejb, jsp, jstl, other stuff on jboss AS.
    I am facing some interesting problem in a jsp page which uses jstl. I have configured all jsp configurations with my web application.
    Presently i am putting an endpage, current page integer values in a session.
    In JSP page whenever i want to iterate a loop and some checks on endPage, curPage it gives me NumberFormatException and finally it results to compile the jsp page.
    The error comes when i am using these variables from session with JSTL tags. The snippet where the problem seems to be is as :
    <c:forEach var="selection" begin="1" end="${endPage}">
         <c:if test="${selection == curPage}">
    May anyone help me on this or whether the there may be some problems with the JSTL configurations ?
    In my view JSTL configurations is ok but the problems seems to be in the statements above or there may be some other way to define it.
    Any inputs ?
    -Sachin
    Software Engineer,
    EpiComm Technologies.

    The Snippet of Error Stack Trace on server console is here:
    11:38:32,234 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NumberFormatException: For input string: "${endPage}"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:468)
         at java.lang.Integer.valueOf(Integer.java:574)
         at org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:752)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.convertString(Generator.java:2914)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2717)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2823)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2156)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1665)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1685)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.portal.portlet.impl.PortletRequestDispatcherImpl.execute(PortletRequestDispatcherImpl.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  • JSTL : problems with sql:query /forEach  tag

    I am not able to iterate thru the resultset provided by <sql:query> tag in JSTL. rowcount and columnName works, which means that query does produce a resultset. However, the <c:forEach> tag doesnt display the retrieved data. Code is approx like:
    c:catch var="e">
    <sql:query var="queryResults" >
    select * from emp
    </sql:query>
    </c:catch>
    <c:if test="${e!=null}">The caught exception is: ${e}
    ${queryResults.rowCount} <br>
    <c:forEach var="row" items="${queryResults.rows}">
    <tr>
    <td> <c:out value="${row.EMPNO}" /></td>
    </tr>
    </c:forEach>
    </table>
    Error thrown is :
    javax.servlet.ServletException: Unable to find a value for "EMPNO" in object of class "java.lang.String" using operator "."
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
         org.apache.jsp.jsp.sql.query_jsp._jspService(query_jsp.java:92)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    Pls. help!

    Thanks a lot all. My problem was solved by simply replacing the taglib directive
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    to
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    Cheers!

  • Can anyone replicate this JSTL problem?

    The following code fails in tomcat 6:
    <c:if test="${not empty requestScope.form && not empty requestScope.form.result}">
    </c:if>but this one works fine:
    <c:if test="${not empty requestScope['form'] && not empty requestScope['form.result']}">
    </c:if>

    I can't replicate the problem easily.
    The tiles exception is potentially hiding the real exception. Check your logs for a root cause.
    I presume "result" is actually an attribute of your "form" object which is an attribute in request scope?
    Here is a test page that I threw together. It should compile and run as is.
    All three scenarios work - where both form and result are present, when just form is present and result is null, and when both are null.
    I would probably go looking into your Form and Result objects.
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Eclipse Java Test Page</title>
    </head>
    <body>
    <h1>Test page</h1>
    <h2> Server Info </h2>
    Server info = <%= application.getServerInfo() %> <br>
    Servlet engine version = <%=  application.getMajorVersion() %>.<%= application.getMinorVersion() %><br>
    JSP version = <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion()  %> <br>
    Java version = <%= System.getProperty("java.vm.version") %><br>
    Java home = <%= System.getProperty("java.home") %><br>
    Session id = <%= session.getId() %><br>
    <%!
      public class Wrapper{
        String result = null;;
        public String getResult(){
          return result;
        public void setResult(String result) {
          this.result = result;
    %>
    <%
        Wrapper form = new Wrapper();
        form.setResult("Hello!");
        Wrapper form2 = new Wrapper();
        request.setAttribute("form", form);
        request.setAttribute("form2", form2);
    %>
        <h2>form</h2>
        <c:out value="${not empty requestScope.form }"/><br>
        <c:out value="${not empty requestScope.form.result }"/><br>
        <c:if test="${not empty requestScope.form && not empty requestScope.form.result }">And == true</c:if><br>
        <h2>form2</h2>   
        <c:out value="${not empty requestScope.form2 }"/><br>
        <c:out value="${not empty requestScope.form2.result }"/><br>
        <c:if test="${not empty requestScope.form2 && not empty requestScope.form2.result }">And == true</c:if><br>
        <h2>form3</h2>
        <c:out value="${not empty requestScope.form3 }"/><br>
        <c:out value="${not empty requestScope.form3.result }"/><br>
        <c:if test="${not empty requestScope.form3 && not empty requestScope.form3.result }">And == true</c:if><br>   
    </body>
    </html>

  • HELP JSTL problem when mixed with appserv-rt.jar

    Hi,
    I've started using JSTL tags in my JSP. All was good until i needed to call a remote EJB from a servlet, store the object to a session, and redirect to a JSP page to display the content of the remote object. We'll just to clear things, i am able to do this properly using JSP expressions <%=myVar%>. And i am able to use <c:out value="${myVar}" /> on a project which does not have appserv-rt.jar inside it's lib directory. I'm getting a java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory; when i add appserv-rt.jar in my lib. I'm using tomcat6 as my web server and glassfish as my app server. Below is the complete stack trace from tomcat:
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
         at org.apache.jasper.compiler.JspUtil.getExpressionFactory(JspUtil.java:1166)
         at org.apache.jasper.compiler.JspUtil.validateExpressions(JspUtil.java:628)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1341)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1117)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
         at org.apache.jasper.compiler.Validator.validate(Validator.java:1837)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
         at gogogo.MyServlet.doPost(MyServlet.java:88)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)
    This has been driving me nuts for days... any help would be deeply appreciated.
    thanks

    So the solution is not to have appserv-rt.jar in the lib directory?
    Which lib directory are you referring to?
    Your WEB-INF/lib or Tomcat's lib?
    I presume you are including appserv-rt.jar for the remote EJB stuff?
    After a quick google I found [this page|http://www.java2s.com/Code/Jar/glassfish/Downloadappservrtjar.htm] listing all the classes included in this jar.
    There are a bunch of Tomcat classes in there - including org.apache.jasper.compiler.
    That would be plenty enough to create classpath clashes between your app and Tomcat's classes.
    After some googling I found this link
    [http://nicl.net/2008/06/tomcat-glassfish-and-ejb-what-a-mess/]
    Maybe it will help you sort out your problem? But definitely this appserv-rt.jar seems overkill for the job of just providing EJB support.

  • Urgent.. JSTL problem. plz help

    I need some help with JSTL string comparison. Plzz someone help!
    I am retrieveing values from an xml file and checking for equality between two strings. Even though the strings are same it does not go in the if condition where I check for equality. I am able to retrieve the correct value from xml and also it is same because I am dispalying the values but its comparison is false. Could someone tell me a possible reason for the same.
    Plzzz help..I am stuck up with this problem since quite long and not able to get a solution.
    this is the code where I compare
    <c:out value="${d} : ${e} : ${d == e}"/>
    the output i get is
    [name="ROSS"] : [name="ROSS"] : false
    I even calculated the length of the string ..that too is same 4, 4 ! So I do not think there are any blank spaces.
    Plzz help!
    Thanks a lot!

    It looks like you are comparing two objects that both have a toString method that returns the same value. Doesn't mean the objects are equal.
    what are d and e?
    if they are objects I'm not sure the best way to compare the two values...
    perhaps add a getValue method to the object and then compare {d.value==e.value}

  • Another JSTL Problem

    I still cant get this SQL in my JSTL to work, what may be wrong,
    I am using PostgreSQL, JDBC, JNDI
    SELECT DISTINCT CONVERT(CHAR(11), R_Date, 111) + SUBSTRING(CONVERT(CHAR(19), R_Date, 100), 13, 19) AS Expr1 FROM Rates Where R_DATE > '2004' ORDER BY Expr1 DESC
    ERROR
    HTTP ERROR: 500
    ERROR: syntax error at or near ","
    If i run this in my postgresql admin tool, it works fine, but not in my jstl?

    I dont think its a db connectin problem, but here is the code.
         <sql:setDataSource
              var="myVar"
              driver="org.postgresql.Driver"
              url="jdbc:postgresql://myDb"
              user="xxx"
              password="xxxx"
         />
    <sql:transaction dataSource="${fnb}">
    <sql:query var="rs">
              SELECT DISTINCT CONVERT(CHAR(11), R_Date, 111) + SUBSTRING(CONVERT(CHAR(19), R_Date, 100), 13, 19) AS Expr1 FROM Rates Where R_DATE > '2004' ORDER BY Expr1 DESC
         </sql:query>
         <c:forEach var="row" items="${rs.rows}">
         <c:set var="testDate" value="${row.R_DATE}"/>
         </c:forEach>
    </sql:transaction>

  • JavaBean - JSP - JSTL - Problem

    Hi, (sorry for the length of this message)
    I have a problem I can't figure out using JavaBeans, JSP, and JSTL. I have two JavaBeans Scoring.java and ScoringManager.java that I use to display some stats over a JSP page with JSTL tags.
    The Scoring.java bean contains all the info related to a the scoring (ie column definitions - GP, G, A, etc.) and the ScoringManager.java handles operations that use the Scoring.java Bean.
    I've use the following methods as well as the executeAdvancedQuery method (which executes the given SQL query on the database - not shown here) and it works fine.
    public Iterator getScorerListIterator( )
    throws SQLException
    return this.getScorerList().listIterator();
    public ArrayList getScorerList( )
    throws SQLException
    String query = "SELECT TOP 30 * FROM vGlobalLeaSea ORDER BY PTS desc, GP asc, G desc;";
    return executeAdvancedQuery(query);
    And this works nicely using this code in a JSP page.
    <jsp:useBean
    id="scoreMan"
    class="com.test.stats.ScoringManager"
    scope="session"
    />
    <table width="180" border="0" cellspacing="0" cellpadding="2">
    <tr>
    <td width="30" class="tsbg1">GP</td>
    <td width="30" class="tsbg1">G</td>
    <td width="30" class="tsbg1">A</td>
    <td width="30" class="tsbg1">PTS</td>
    </tr>
    <c:forEach items="${scoreMan.scorerListIterator}" var="scoreInfo">
    <tr>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.gamesPlayed}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.goals}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.assists}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.points}"/></td>
    </tr>
    </c:forEach>
    </table>
    Here's the problem! I want to be able to recuperate a parameter from the address bar (/thepage.jsp?id=2) and pass it to the following methods:
    public Iterator getScoringListBySeasonIterator(int seasonId)
    throws SQLException
    return this.getScoringListBySeason(seasonId).listIterator();
    public ArrayList getScoringListBySeason(int seasonId)
    throws SQLException
    String query = "SELECT * FROM vGlobalLeaSea "
    + "WHERE sd_id = "+ seasonId +";";
    return executeAdvancedQuery(query);
    And here's the code I think should be ok... that isn't
    <jsp:useBean
    id="scoreMan"
    class="com.test.stats.ScoringManager"
    scope="session"
    />
    <table width="180" border="0" cellspacing="0" cellpadding="2">
    <tr>
    <td width="30" class="tsbg1">GP</td>
    <td width="30" class="tsbg1">G</td>
    <td width="30" class="tsbg1">A</td>
    <td width="30" class="tsbg1">PTS</td>
    </tr>
    <c:forEach items="${scoreMan.scorerListBySeasonIterator[param.id]}" var="scoreInfo">
    <tr>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.gamesPlayed}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.goals}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.assists}"/></td>
    <td width="30" class="tsbg2"><c:out value="${scoreInfo.points}"/></td>
    </tr>
    </c:forEach>
    </table>
    I've taken car to use an java.util.Iterator as Java type for the items and dynamic values are allowed.
    I've search the web and read many articles to find an answer but I always end up with some error message.
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: An error occurred while evaluating custom action attribute "items" with value "${scoreMan.scorerListBySeasonIterator[param.id]}": Unable to find a value for "scorerListBySeasonIterator" in object of class "com.test.stats.ScoringManager" using operator "." (null)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    root cause
    javax.servlet.ServletException: An error occurred while evaluating custom action attribute "items" with value "${scoreMan.scorerListBySeasonIterator[param.id]}": Unable to find a value for "scorerListBySeasonIterator" in object of class "com.test.stats.ScoringManager" using operator "." (null)
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:494)
         at org.apache.jsp.leaseaTestJAVA_jsp._jspService(leaseaTestJAVA_jsp.java:409)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    Anyone has a clue?
    Thanks in advance for any help!
    John

    The problem comes with the fact you are breaking the JavaBeans rules. There are strict rules to follow to make JavaBeans work...
    You set paramaters using
    public void setParamName(ParamType value)
    methods.
    You get parameters with
    public ParamType getParamName()
    methods.
    You can not pass a value into a get method, the argument list must be void.
    So to do what you want, you should create a ne parameter, called seasonId:
      private int seasonID = -1;
      public void setSeasonID(int i) { seasonID - i; }
      public int getSeasonID() { return seasonID; }Then use that for your getScoringListBySeason() method... but I would also throw an IllegalStateException if the seasonID was not set yet...
      public Iterator getScoringListBySeasonIterator() { return getScoringListBySeason().iterator(); }
      public List getScoringListBySeason()
        if (seasonID == -1) throw new IllegalStateException ("Season ID Must be set before the Scoring List can be retrieved.");
        //.. rest of code
      }Then in your JSP you would do this:
      <jsp:useBean class="com.test.stats.ScoringManager" id="scoreMan" scope="session"/>
      <jsp:setProperty name="scoreMan" property="seasonID" value="${param.id}"/>Then you should be able to work with the scoringListBySeason and scoringListBySeasonIterator properties as you did the other get methods...

  • JSTL - Problem with formatDate and OC4J

    When using the formatDate tag a "java.lang.IllegalStateException: Response is already committed!" error occurs sometimes. But it doesn't just start happening all over the application. The same JSP can be executed with two different dates, one will work and the other will cause the exception.
    Here is the last few lines of the stack trace:
    java.lang.IllegalStateException: Response is already committed!
         at com.evermind.server.http.EvermindHttpServletResponse.setLocale(EvermindHttpServletResponse.java:1754)
         at javax.servlet.ServletResponseWrapper.setLocale(ServletResponseWrapper.java:224)
         at org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport.setResponseLocale(SetLocaleSupport.java:234)
         at org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport.getFormattingLocale(SetLocaleSupport.java:314)
         at org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.doEndTag(FormatDateSupport.java:148)

    I have exactly the same problem ! :-(
    On OC4J 10.1.2 with JSTL:
    java.lang.IllegalStateException: Response is already committed!
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.EvermindHttpServletResponse.setLocale(EvermindHttpServletResponse.java:1809)
         at org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport.setResponseLocale(SetLocaleSupport.java:234)
         at org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport.getFormattingLocale(SetLocaleSupport.java:314)
         at org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.doEndTag(FormatDateSupport.java:148)
    An idea ?

  • JSTL - Problem parsing XML file w/ XML schema declarations

    I'm having trouble parsing an xml document that contains XML schema declarations in the root element. I've included 2 snippets, the XML files they're supposed to parse, and their output below. The first one works and the second one doesn't. Could someone please tell me why? I find it hard to believe that no one's run into this before.
    I'm running Tomcat 5.5 and I'm using JSP 2.0, jakarta standard taglibs jars (1.1.2), jdk 1.5.0_04, and the Xalan 2.7.0 jars.
    Here's the first snippet:
    <c:import url="/WEB-INF/config/schools.xml" var="xml" />
    <x:parse doc="${xml}" var="schoolList"/>
    There are <x:out select="count($schoolList//school)"/> schools in the file:<br/>
    <x:forEach select="$schoolList//school">
         <x:out select="name"/><br/>
    </x:forEach>it parses the following xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <schools>
         <school id="34033">
              <name>Tumwater Middle School</name>
              <district>Tumwater</district>
              <type>middle</type>
              <active>false</active>
         </school>
         <school id="17001">
              <name>Garfield High School</name>
              <district>Seattle</district>
              <type>high</type>
              <active>true</active>
         </school>
         <school id="00023">
              <name>Tigard High School</name>
              <district>Tigard-Tualatin</district>
              <type>high</type>
              <active>true</active>
         </school>
    </schools>and it outputs:
    There are 3 schools in the file:
    Tumwater Middle School
    Garfield High School
    Tigard High School-----------------------------------------
    The second snippet:
    <c:import url="/WEB-INF/config/schools2.xml" var="xml2" />
    <x:parse doc="${xml2}" var="schoolList2"/>
    There are <x:out select="count($schoolList2//school)"/> schools in the file:<br/>
    <x:forEach select="$schoolList2//school">
         <x:out select="name"/><br/>
    </x:forEach>parses this xml file (note the xml schema declarations):
    <?xml version="1.0" encoding="UTF-8"?>
    <schools xmlns="http://www.serenus.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.serenus.com schools.xsd">
         <school id="34033">
              <name>Tumwater Middle School</name>
              <district>Tumwater</district>
              <type>middle</type>
              <active>false</active>
         </school>
         <school id="17001">
              <name>Garfield High School</name>
              <district>Seattle</district>
              <type>high</type>
              <active>true</active>
         </school>
         <school id="00023">
              <name>Tigard High School</name>
              <district>Tigard-Tualatin</district>
              <type>high</type>
              <active>true</active>
         </school>
    </schools>and its output is:
    There are 0 schools in the file:That's it! No errors at all! I'm 100% certain the variable names, filenames, etc. are correct. I've looked everywhere for an existing answer to this problem, but I can't find one. Is this a known issue? Please help.
    -Ben

    Hi Ben,
    I got exactly the same problem and also could not find any solution.
    Did you find a way out for this problem meanwhile?
    Any help is welcome!

  • JSTL Problem with attribute names

    (Sorry for double posting. I've asked this question on javaranch, but did not get any answer. So I hope you can help me.)
    The values I pass (request.setAttribute etc.) from my servlet to my JSP pages have often dots in their names like "my.variable" (Assume for the following that my.variable justs holds the String "hello").
    I want to use <c:out > to print the value of "my.variable". Obviously the naming scheme collides with the expression language ("my" is not an object and certainly does not have the getter getVariable). Is there a way to work around this problem?

    What? Why do you consider it a bad way? It's the only
    naming scheme I know!
    It's pretty straight forward to use the package name
    to make your attribute names unique. See either Struts
    or Java Petstore (org.apache.struts.Globals or
    com.sun.j2ee.blueprints.waf.controller.web.util.WebKeys
    as an example.Btw those Globals and WebKeys, are static finals or constants.
    this is something completely different, and if you would really look good in stead of refusing some friendly advice you'll see that indeed the packages are separated with a . and the variables are with a _
    so calm down and try to listen what we say.
    If you give to java a x.y he'll thing y is a method of x or that y is a class in the package x
    ok?
    greetings

  • JSTL = Problem in connecting to MS SQL Server 2005

    hi....i really need some help here
    I am having touble in connecting MS SQL 2005 using odbc driver. The code is as below,
    <sql:setDataSource var="datasource" driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:eleavedao" user="" password=""/>
    <sql:query var="count" dataSource="${datasource}">
    SELECT * FROM hr_leave_entry where userId = ?
    <sql:param value="${userid}"/>
    </sql:query>
    <c:set var="maxrow" value="${count.rowCount}" />
    From the code, i tried printing out some output into the interface. I realised that it printed out the query statement. Is there anything that i need to set other than set the odbc?
    Your help is greatly appreciated. Thank You!
    -Regards-

    Have you imported the JSTL sql tag library
    Are the <sql> tags still on the page as well as the query?

  • JSTL problem

    Hi!!!!!!!!!!!
    I have
    <taglib>
    <taglib-uri><taglib-uri>http://jakarta.apache.org/taglibs/c.tld</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
    </taglib>
    my web.xml in webapps folder
    and in my jsp i am using
    <%@ taglib prefix="c" uri="/WEB-INF/c.tld" %>
    it is giving me
    org.apache.jasper.JasperException: File "/WEB-INF/c.tld" not found
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:60)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:385)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:109)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:137)
         at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:309)
         at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:336)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:750)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:77)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:157)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:111)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:183)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:445)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)

    sorry i missed something :)
    this is the "usual" way...Bzzt, no not at all!
    in your jsp:
    <%@ taglib uri="http://jakarta.apache.org/taglibs"
    prefix="c" %>if you are using JSTL 1.1 (Tomcat 5, or another JSP 2.0 server)
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    Or, if you are using JSTL 1.0 (Tomcat 4, or another JSP 1.x server)
    <%@ taglib usi="http://java.sun.com/jsp/core" prefix="c" %>
    in your web.xml:DO NOTHING!!
    Get rid of the taglib definitions in your web.xml. They don't need to be there. Additionally, if you have any .tlds hanging around get rid of them! All you need is the JAR files in your WEB-INF/lib directory.

  • JSTL problem with LinkedHashMap changed to Map

    Originally my code worked with a linkedHashMap in java 1.4. Another developer converted it to 1.5 and changed my linkedHashMap to a Map<String, Map<String, List<DateSensitiveDTO>>>
    in the jstl I used to do ${dsMap.value['display']}
    now that code throws the following exception
    Error 500: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
    any ideas of what would cause this? I've checked and the code is still putting 'display' into the map. I can output ${dsMap} in the jsp and I can see that 'display' exists inside the output.. I can only assume jstl is doing something different because of the data type, but I have no idea how to fix it.. except of course change the declaration back to a linkedHashMap.

    sorry to post this. I just answered my own question.. the exception in the jsp wasn't ocuring where I assumed it was, and had to do with the fact he also changed the structure of the objects being set in the Map... I assumed he tested his code to make sure it worked... guess it was a bad assumption.

  • Weird but simple JSTL problem

    so a servelet forward the request to jsp, passing a request attribute which is String[ ] as following..
    request.setAttribute("headers",headers);RequestDispatcher view = request.getRequestDispatcher("options.jsp");
    view.forward(request,response);
    in the options.jsp, I tried to use JSTL to iterate each element in the array and display it..
    <c:forEach var="header" items="${headers}" varStatus="loopCounter">
    <td><span class="style2"> ${header} <BR>${loopCounter.count}</span></td>
    </c:forEach>
    ..simple and straghtforwrd..But it doesn't display each element in the String[ ], insteads, it shows something like
    "org.apache.commons.el.ImplicitObjects7@6279d"
    ..... for each of the element (exactly the same).. but the loopCounter.count shows correctly, with correct number of elements expected..
    WHY??!

    ${header} is an implicit variable in EL.
    It provides a map to be the equivalent of request.getHeader(), much like ${param} is the equivalent of request.getParameter().
    solution: rename your variable to be something else.
    <c:forEach var="hdr" items="${headers}" varStatus="loopCounter">
      <td><span class="style2"> ${hdr} <BR>${loopCounter.count}</span></td>
    </c:forEach>

Maybe you are looking for

  • Ipod no longer responding

    I've had my ipod for a few months now, and it has always worked with my computer. However, I just recently charged it after not using it for about 2 months, and now it is giving me an error message when I try to turn it on. After I disconnected it fr

  • Trigger a Process chain

    Hi All, After a long time, approaching SDN for a help. At first i thank all the contributors. I had a requirement, my client wants a process chain in event based triggering. Scenario: There is a process chain, lets say: ZTEST_PC. This pulls GL data,

  • Issue about SOA Manager for PI 7.1

    Hi   I've converted a function module to web service. I open the SOA Manager and the web service exists in the directory, But i'm not able to open the links for 1)Open porttype WSDL document      2) Open WSDL document for selected binding      3) Ope

  • Does iMoveHD 6 allow you to create a split screen video?

    Probably have too much time on my hand, but would like to create a side by side comparison of my girl pitching. Possible without plug in/final cut?

  • Parsing data with java is killing me

    i created some data in notepad which contains :: embedded in the data my loop gets to the :: and does not see the :: while (Strpos < (line.length() ) ) { index = Strpos +2; colons = (line.substring(Strpos, index)) ; System.out.println(colons);// i ca