File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Jasper exception regarding JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Jasper exception regarding JSTL" Watch "Jasper exception regarding JSTL" New topic
Author

Jasper exception regarding JSTL

Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

I'm trying to deploy my web application on apache tomcat. It works well when I deploy it on tomcat with eclipse but trying to run it from the webapps folder of Apace tomcat7 gives me this error:



Now, I've tried several different versions of the JSTL jar and have seen plenty of solutions involving modifying the projects web.xml. Problem, my project does not have a web.xml. It uses servlet 3.0 annonations instead. Is there another solution I'm missing?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16014
    
  20

When you "tried various versions of jstl.jar", where did you try them? You should have one (and only one) jstl.jar file, located in the WEB-INF/lib directory. If you were putting it in the TOMCAT_HOME/lib directory, remove it.


Customer surveys are for companies who didn't pay proper attention to begin with.
Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

Tim Holloway wrote:When you "tried various versions of jstl.jar", where did you try them? You should have one (and only one) jstl.jar file, located in the WEB-INF/lib directory. If you were putting it in the TOMCAT_HOME/lib directory, remove it.


Thanks for the reply. I used jstl.jar in my apps WEB-INF/lib folder.

One thing that's also been bothering me. My app runs automatically when I access my "hello.jsp" JSP (it worked fine when I deployed it on tomcat using eclipse but I need to have it work when I deploy it on tomcat in the webapps folder). But when I try to access the app through tomcats manager, "localhost:8080/demo", I get a 404 error. Its when I access the page through "localhost:8080/demo/hello.jsp" that it appears to run but encounters the error. Would these be related to my problem?

EDIT: One more thing, you mentioned there should only be one jstl.jar but one of the versions came in two parts "jstl 1.2.1-api.jar" and "jstl 1.2.1 - impl.jar", where what they were called. Is there a difference between these and the single jar?
Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

Ok. After some fiddling around I managed to get it working by compressing to a .war file. I won't mark this as resolved though because the original problem still stands.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16014
    
  20

Something to consider: The default implementation of Tomcat will take a WAR that has been dropped into the TOMCAT_HOME/webapps folder and "explode" (unzip) it to a like-named folder. Thereafter, the exploded copy becomes the authoritative copy even if you install a new WAR. So to ensure that you're running what you think you're running, delete both the old WAR file and the exploded WAR directory before deploying a new WAR.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jasper exception regarding JSTL