Problem with JSTL/JavaBeans/JSP
Ok, I'll try to describe my problem as clearly as possible.
- I'm usingEclipse ObjectWeb Lomboz;
- I'm usingJOnAS 4.x (Tomcat 5.5.15 is mentioned in the title bar of Eclipse);
- Jstl.jar and standard.jar are located in 'C:(...)\JavaDocumenten\IndustrialWebs\WebContent\WEB-INF\lib';
- The server's location is 'C:\JAVAServer\JOnAS-4.7.4';
- I'm using JDK1.5.0_11 which is located in 'C:\Program Files\JAVA';
- I'm using SDK which is also located as stated above;
- I'm using JRE1.5.0_11 which is also located as stated above;
- The server, Eclipse and everything works, as long as I'm not using JSTL to try to connect to a bean.
The structure within Eclipse is as follows:
I've gotIndustrialWebs andIndustrialWebsEAR under Projects, the project is obviously connected to the server.
Within IndustrialWebs, the following things are present:
- Deployment Descriptor
- Java Resources
* datalayer
+ Personen.java
+ Select PersoonBean.java
* Libraries
+ EAR Libraries (empty)
+ JOnAS v4;
^ ow_jonas_bootstrap.jar
^ ejb-2_1-api.jar
^ servlet-2_4.jar
^ jms.jar
+ JRE System Library (jdk1.5.0_11)
^ rt.jar, jsse.jar, jce.jar, charsets.jar, dnsns.jar, localedata.jar, sunjce_provider.jar, sunpkcs11.jar;
+ Web App Libraries
^ jst.jar
^ standard.jar
- build (irrelevant to describe);
- WebContent
+ META-INF
+ WEB-INF
* lib (empty)
* web.xml
+ The jsp-files, including testbean.jsp
The problem is as follows:
javax.servlet.ServletException: javax/servlet/jsp/tagext/TagLibraryValidator
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
root cause
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
java.lang.ClassLoader.findBootstrapClass(Native Method)
java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891)
java.lang.ClassLoader.loadClass(ClassLoader.java:301)
java.lang.ClassLoader.loadClass(ClassLoader.java:299)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1267)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
org.apache.jasper.compiler.TagLibraryInfoImpl.createValidator(TagLibraryInfoImpl.java:649)
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:246)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:179)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
The error is produced by 'testbean.jsp', a jsp-file which I'm using to test a bean responsible for connecting to the database.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<jsp:useBean id="SelectPersoonBean" class="datalayer.SelectPersoonBean" scope="request" />
<c:forEach var="Personen" items="${SelectPersoonBean.list}">
If nothing is wrong with that jsp file, the error is not to be found anywhere in the code itself, since the bean itself worked perfectly while running it within Eclipse.
I searched the whole wide web but no solution seems to work. Is there ANYONE who knows what the problem might be, and more importantly, what the solution is?

