Tomcat 7 and Jstl

Tomcat 7 and JSTL

Tomcat has never included JSTL.

You should put the jstl and standard jars in WEB-INF/lib (you've done that), and make sure you have the permissions to read them (chmod)

Your URI is correct and it should work (works here)

JSTL is not working after migration to Tomcat 7

There is a system property that you can set for Tomcat 7

-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true

Reference

JSP Error: contains invalid expression. Failed to parse the expression

Implementing JSTL 1.2.1 in a Servlet 3.0 container on Tomcat 7

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

This class is part of JSP 2.0. Tomcat is a Servlet 3.0 / JSP 2.2 container. Make sure that your web.xml is declared conform Servlet 3.0.

<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">

<!-- Config here. -->

</web-app>

And also that you don't have arbitrary JAR files of a different container make/version like jsp-api.jar from Tomcat 5.5 or so in your /WEB-INF/lib. It would otherwise only conflict. See also How do I import the javax.servlet API in my Eclipse project?


I have placed the two JSTL 1.2.1 jars in WEB-INF/lib of the test web app

That should be sufficient. If cleaning the web.xml and the classpath still doesn't fix the problem, perhaps you don't have the right JARs at all. In our JSTL wiki page you can find a download link to a single jstl-1.2.jar file. Drop it in /WEB-INF/lib and remove the other JARs.


and the CLASSPATH for my JRE.

Please don't do that. Just dropping the JSTL JAR in /WEB-INF/lib is sufficient. Also make sure that you don't drop arbitrary servletcontainer-specific JARs in your JRE/lib or JRE/lib/ext. Just don't touch those folders. Webapp-specific libraries should go in /WEB-INF/lib. If you're using an IDE, it will then do automatically all the necessary magic. You don't even need to fiddle in buildpath properties. The CLASSPATH environment variable is only used when you run java command in your command console and even then only when you run it without the -cp, -classpath and -jar arguments.

Migrating from Tomcat 7 to 8 in Eclipse WTP: The absolute uri: http://java.sun.com/jstl/core cannot be resolved

The issue seems to be with the "Serve modules without publishing" feature.

Turning it off solved the issue.

Sample Image

How to make JSTL library work in Tomcat 7 on Ubuntu

Don't put anything to the ROOT, because if you undeploy your app the root context will be shown to the user. Use the following path

/var/lib/tomcat7/webapps/myapp

Make sure you have used an environment variable and system property for

CATALINA_BASE=/var/lib/tomcat7

To deploy the application better to create .war file and put it into webapps either manually or better using a tomcat manager app. The tomcat is configured by default to start automatic deployment if you put a file to the webapps.
All libraries in the war should be in /WEB-INF/lib.

You can use this answer to download required jars from accredited sources.



Related Topics



Leave a reply



Submit