Configure the following dependencies in Maven:
<Dependency>
<Groupid> javax. servlet </groupid>
<Artifactid> jstl </artifactid>
<Version> 1.2 </version>
</Dependency>
Run in resin-3.0.28 and report the following error:
Servlet. Service () for servlet JSP threw exception
Java. Lang. noclassdeffounderror: javax/El/elexception
The reason is that the container does not support jstl1.2, just replace it with the following dependencies:
<Dependency>
<Groupid> javax. servlet </groupid>
<Artifactid> jstl </artifactid>
<Version> 1.1.2 </version>
</Dependency>
The same problem also exists in Tomcat.
Tomcat6 jsp2.1/servlet2.5/jstl2.0
Tomcat5 jsp2.0/servlet2.4/jstl1.1
Tomcat4 jsp1.2/servlet2.3/jstl1.0
Resin-3.0.28 jsp2.0/servlet2.4/jstl1.1
Tomcat5 and tomcat6 El conflicts, jstl version Problems
Servlet. Service () for servlet JSP threw exception
Java. Lang. noclassdeffounderror: javax/El/elexception
At java. Lang. Class. getdeclaredmethods0 (native method)
At java. Lang. Class. privategetdeclaredmethods (class. Java: 2365)
At java. Lang. Class. getdeclaredmethods (class. Java: 1763)
At java. Beans. introspector $ 1.run( introspector. Java: 1259)
At java. Security. accesscontroller. doprivileged (native method)
At java. Beans. introspector. getpublicdeclaredmethods (introspector. Java: 1257)
At java. Beans. introspector. gettargetmethodinfo (introspector. Java: 1125)
At java. Beans. introspector. getbeaninfo (introspector. Java: 383)
At java. Beans. introspector. getbeaninfo (introspector. Java: 155)
At java. Beans. introspector. getbeaninfo (introspector. Java: 216)
At java. Beans. introspector. <init> (introspector. Java: 364)
At java. Beans. introspector. getbeaninfo (introspector. Java: 155)
At org. Apache. Jasper. compiler. Generator $ taghandlerinfo. <init> (generator. Java: 3673)
At org. Apache. Jasper. compiler. Generator $ generatevisitor. gettaghandlerinfo (generator. Java: 2092)
At org. Apache. Jasper. compiler. Generator $ generatevisitor. Visit (generator. Java: 1573)
At org. Apache. Jasper. compiler. node $ customtag. Accept (node. Java: 1441)
At org. Apache. Jasper. compiler. node $ node. Visit (node. Java: 2163)
At org. Apache. Jasper. compiler. node $ visitor. visitbody (node. Java: 2213)
At org. Apache. Jasper. compiler. node $ visitor. Visit (node. Java: 2219)
This problem should be caused by the support of jstl. Check that jstl1.2 was used in the original system.
Jstl1.2
The jstl 1.2 Maintenace release aligns with the Unified Expression Language (EL) that is being delivered as part of the assumerver pages (JSP) 2.1 specification. Jstl 1.2 is part of the Java ee 5 platform. (from http://java.sun.com/products/jsp/jstl)
Jstl1.1
Jakarta taglibs hosts the standard taglib 1.1, an implementation of the JSP standard tag Library (jstl), Version 1.1, which was developed under the Java Community process.
Note: standard-1.1 (jstl 1.1) requires a JSP Container that supports the Java Servlet 2.4 and has erver pages 2.0 specifications. jakarta Tomcat 5 supports the new specifications. the standard-1.1 taglib has been tested with Tomcat 5.0.3.
Jstl1.0
Standard-1.0 (implementation of the jstl 1.0 specification) requires a JSP Container that supports the Java Servlet 2.3 and extends erver pages 1.2 specifications. jakarta Tomcat 4 supports these specifications. the standard 1.0 taglib has been tested with Tomcat 4.1.24. (From http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html)
Tomcat6 implements servlet 2.5 and jsp2.1 specifications and supports jstl1.2;
Tomcat5 implements servlet 2.4 and jsp2.0 specifications and only supports jstl1.1.
So, just use jstl1.1 (standard-1.1.jar and jstl-1.1.jar) to replace jstl1.2 (jstl-1.2.jar) to run normally in tomcat5!
In addition, Web. xml must specify the specifications of servlet 2.4 and jsp2.0:
<Web-app version = "2.4" xmlns = "http://java.sun.com/xml/ns/j2ee"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">