| Author |
page 434 JSTL
|
Frederik Ericsson
Ranch Hand
Joined: Apr 27, 2005
Posts: 128
|
|
Hello friends, Actually I copied jstl.jar and placed in wen-inf/lib. after that I tried to run this code. <%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %> <html> <body> Movie list <c:forEach var = "movie" items = $ {movieList}"> ${movie} </c:forEach> </body> </html> am geting this error org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application 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:116) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:309) my jstl.jar path is C:\Documents and Settings\Administrator\My Documents\eclipse\workspace\TomcatProject\WEB-INF\lib\jstl.jar just I copied jstl.jar into this folder. do I need to unzip it? can you please solve my pb?
|
 |
Gowher Naik
Ranch Hand
Joined: Feb 07, 2005
Posts: 643
|
|
|
copy standard.jar also.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
http://faq.javaranch.com/view?JstlTagLibDefinitions
|
[My Blog]
All roads lead to JavaRanch
|
 |
Frederik Ericsson
Ranch Hand
Joined: Apr 27, 2005
Posts: 128
|
|
Hello friends, I have copied both the jar files... again am geting the same error. do I need to do some changes in web.xml? please help me
|
 |
Frederik Ericsson
Ranch Hand
Joined: Apr 27, 2005
Posts: 128
|
|
I made it... Yes I did some change in web.xml <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/lib/jstl.jar</taglib-location> </taglib> But am geting diff error in my console like this error: Exception initializing TldLocationsCache: zip file closed <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <html><body> <strong> Movie List: </strong> <% String movieList= "Lion King"; %> <table> ${movieList} </table> </body></html> the O/P shows like this...not printing the value... Movie List: ${movieList} do i need to unzip both the .jar files... please help me...guys
|
 |
Niranjan Deshpande
Ranch Hand
Joined: Oct 16, 2005
Posts: 1277
|
|
explicitly enable the EL and the retry also in your frst post you were using the c:forEach, but in your second post you havent used it anywhere. ?
|
SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
|
 |
 |
|
|
subject: page 434 JSTL
|
|
|