Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL problem  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have JSP 2.o and I am using websphere studio 5.1.

I downloaded jstl.jar and standars.jar files from

http://cvs.apache.org/builds/jakarta-taglibs/nightly/projects/standard/
jakarta-taglibs-standard-20041026.zip (last one).

From the zip file I copied standard.jar and jstl.jar to web-inf/lib
I also copied c.tld and fmt.tld to my web-inf directory.
I n my lib I also have jdom,xerces,xalan,and struts.jar files

I get error when I run jstl code.

my JSTL CODE

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<c:set var="totalCount" scope="session" value="100"/>
<c:set var="perPage" scope="session" value="20"/>
<c:forEach
var="boundaryStart"
begin="0"
end="${totalCount - 1}"
step="${perPage}">
<a href="?start=<c ut value="${boundaryStart}"/>">
[
<c ut value="${boundaryStart}"/>
-
<c ut value="${boundaryStart + perPage - 1}"/>
]
</a>
</c:forEach>
<c:forEach
var="current"
varStatus="status"
begin="${param.start}"
end="${param.start + perPage - 1}">
<c:if test="${status.first}">
<ul>
</c:if>
<li><c ut value="${current}"/></li>
<c:if test="${status.last}">
</ul>
</c:if>
</c:forEach>


[10/26/04 11:33:48:400 EDT] 37279ac5 WebGroup E SRVE0026E: [Servlet Error]-[javax/servlet/jsp/el/ELException]: java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:1079)
at java.beans.Introspector$1.run(Introspector.java:880)
at java.security.AccessController.doPrivileged(Native Method)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:878)
at java.beans.Introspector.getTargetEventInfo(Introspector.java:584)
at java.beans.Introspector.getBeanInfo(Introspector.java:322)
at java.beans.Introspector.<init>(Introspector.java:299)
at java.beans.Introspector.getBeanInfo(Introspector.java:106)
at org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:124)
at com.ibm.ws.webcontainer.jsp.compiler.BasicTagBeginGenerator.init(BasicTagBeginGenerator.java:88)
at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspParseEventListener.java:1001)
at org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventListener.java:179)
at org.apache.jasper.compiler.ConfigurableParseEventListener.handleTagBegin(ConfigurableParseEventListener.java:739)
at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:221)
at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:216)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:859)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1152)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1110)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1106)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:309)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:211)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:861)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:278)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:304)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:598)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>If with Body</title>
</head>

<body>
<c:if test="${pageContext.request.method=='POST'}">
<c:if test="${param.guess=='Java'}">You guessed it!
<br />

<br />

<br />
</c:if>

<c:if test="${param.guess!='Java'}">You are wrong
<br />

<br />

<br />
</c:if>
</c:if>

<form method="post">Guess what computer language
I am thinking of?
<input type="text" name="guess" />

<input type="submit" value="Try!" />

<br />
</form>
</body>
</html>

this code works!!! Strange?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the c:set tag is what is causing the error. IS there any specific jar that I have to add to my lib that supports EL
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!