Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL in WEB-INF/lib is not recongnized  RSS feed

 
prakash chauhan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
If i put JSTL.JAR in my WEB-INF/lib folder , tomcat gives the error that that absolute path " http://sun.java.../core/jstl" is not found in web.xml or in the jar files..
but it works if placed in tomcat's common lib folder.
do we need to configure something other than just putting it in WEB-INF/LIB folder?
do have to declare the URI for the jstl in the web.xml file?

-Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prakash chauhan:
If i put JSTL.JAR in my WEB-INF/lib folder


Do you mean jstl.jar? Case counts, please be careful when you post to use the actual names of things including case.

Where did you put standard.jar?

tomcat gives the error that that absolute path " http://sun.java.../core/jstl" is not found


That is not a valid URI. Please be sure to use the correct URI.

Also, be sure to use the correct URI for the version of the JSTL that you are using. What version of the JSTL are you using, and what version of Tomcat?

do we need to configure something other than just putting it in WEB-INF/LIB folder?

Do you mean WEB-INF/lib? Again, please be accurate. Otherwise you waste people's time following red herrings. Please read this for more information.

do have to declare the URI for the jstl in the web.xml file?

No. In fact, doing so would be a bad practice.

There is an entry in the JSP FAQ that covers JSTL setup.
[ November 14, 2007: Message edited by: Bear Bibeault ]
 
prakash chauhan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about the mistakes.
yes the jar file is jstl.jar and i put it in the WEB-INF/lib folder.
the uri is : "<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>"
and tomcat 5.5.9 tells me that the name could not be resolved in web.xml or the included jar files.
i did put the standard.jar file in the WEB-INF/lib folder but still got the same message , but as i mentioned in the previous post putting jstl.jar in the tomcats common/lib folder fixed the problem and i dint put the standard.jar file there. Is standard.jar file needed for jstl tags?

-Thanks
 
prakash chauhan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just an update.
I placed the standard.jar and jstl.jar in my WEB-INF/lib folder
reloaded the application and it worked.
The book doesnt tell that we have to put standard.jar as well in the WEB-INF/lib folder
-Thanks for guiding
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prakash chauhan:
the uri is : "<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>"
and tomcat 5.5.9


That is the wrong URI. That is the URI for JSTL 1.0. With Tomcat 5, you chould be using JSTL 1.1!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!