java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException
from using
<c:set var="testVar" value="testVal" />
All other JSTL tags work.
jsp 1.2
Java 1.4Howver, the above works when I view this jsp in the global container. In other words the IT department made an entry in the server.xml file to register my web application. It is in my web application space that I 开发者_高级运维get the above error. But it works fine if I view the jsp file when it is located outside this web app folder, I guess in some sort of default wep app for the server.
In my web application lib folder I have jstl.jar and standard.jar libraries that I was using with in Eclipse when developing locall. My Eclipse environment is set to mimic the java and jsp versions of our outdated production server.
You're using a too new JSTL version for your servletcontainer. JSTL 1.0 which is designed for JSP 1.2 has the class ELException
included in JSTL JAR file. JSTL 1.1 which is designed for JSP 2.0 doesn't have it included anymore since that's together with several EL specific classes moved to JSP 2.0 API (which is provided by the servletcontainer itself).
When you run JSTL 1.1 on a JSP 1.2 container, it'll complain that ELException
is missing because it's not available by JSP 1.2.
So, to fix your problem, downgrade your JSTL version to 1.0. It's available here.
Java 1.4 is pretty old.
I would verify the version of standard.jar and jstl.jar that you're using, because the URI changed from one version to the next. I wonder if you have different versions of the JSTL JARs on your local machine and the server.
I'd strongly recommend a JDK upgrade. Even JDK 5 has reached the end of its support life. You're skating on very thin ice using JDK 1.4.
精彩评论