trobutta
asked on
Tomcat 5.0 JSTL 1.1 error when trying to loop over params
I'm running Tomcat 5.0 using jstl 1.1 and have examples from oreilly under my webapps folder that don't have any problems with the following code. Also, what is the best way to handle complex forms in JSP using JSTL? Could someone please help.
When I attempt to do something like this:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:forEach items="${param}" var="current">
<c:out value="${current.key}" />
<c:out value="${current.value}" />
</c:forEach>
I get this error:
-------------------------- ---------
exception
org.apache.jasper.JasperEx ception
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 58)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:301)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:248)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 856)
root cause
java.lang.NullPointerExcep tion
org.apache.jsp.testCheck_j sp._jspSer vice(testC heck_jsp.j ava:180)
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:133 )
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 856)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 11)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:301)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:248)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 856)
-------------------------- ---------- ----
When I attempt to do something like this:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:forEach items="${param}" var="current">
<c:out value="${current.key}" />
<c:out value="${current.value}" />
</c:forEach>
I get this error:
--------------------------
exception
org.apache.jasper.JasperEx
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
java.lang.NullPointerExcep
org.apache.jsp.testCheck_j
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
--------------------------
ASKER
currently using java 1.4.2
my WEB-INF/lib/ directory contains
jstl.jar and standard.jar that I got from the
webapps\jsp-examples\WEB-I NF\lib directory that installed with tomcat
I just realized the code I posted doesn't run in their examples folder either.
Should I try to up date the jar files?
my WEB-INF/lib/ directory contains
jstl.jar and standard.jar that I got from the
webapps\jsp-examples\WEB-I
I just realized the code I posted doesn't run in their examples folder either.
Should I try to up date the jar files?
ASKER
I got the freshest files from jakarta for jstl 1.1 and it still won't run for me.
The code does run under another folder that has an outdated jstl implementation..
but other things I'm doing don't run under that jstl implementation.
The code does run under another folder that has an outdated jstl implementation..
but other things I'm doing don't run under that jstl implementation.
are you getting the same error with the new version of jstl?
Ghost
Ghost
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>java.lang.NullPointerExce ption
org.apache.jsp.testCheck_j sp._jspSer vice(testC heck_jsp.j ava:180)
Please show us line 180. Look in Tomcat's work folder. rrz
org.apache.jsp.testCheck_j
Please show us line 180. Look in Tomcat's work folder. rrz
I could not reproduce the error. Which version of java are you using ?
Are you sure that you have the 1.1 jars ?