hello all,
I am using jre_jdk1.6.0_17 on a windows vista operating system with GlassFish v3 (build 47.4).
My project is using JSP/JSF as a front end. As a backend I am using a mysql database in the ejb layer using JPA. My war file is called JsfEjbTest2.war and my ejb jar file is called EJBTest2.jar. They are both contained in a TestExample.ear file.
I get the problem when:
I get data back from my ejbs and try to display that data in my jsp. I put that data into a request attribute, using request.setAttribute(). I am going to retrieve this request attribute in my jsp and then display it. And in order to do this I have to declare the type of data in the request attribute. But when I use the JSP import statement to declare the data type this is the place that the JSP compiler has a problem.
1. I get a compile error in my findProspectsDisplay.jsp on line 7.
At line 7 is an import statement in my jsp and my error happens here:
<%@ page import="org.joke.model.Prospect"%>
2. the location of this class:
org.joke.model.Prospect is contained in my EJBTest2.jar,
it is not contained in my JsfTest.war file.
I have tried using the "Class-Path: EJBTest2.jar" attribute in my war MANIFEST.MF file but I still get the same jsp compile error whether it is there or not.
3. I get the following error message in the stack dump in the server.log:
[#|2009-12-06T00:25:36.550+0100|SEVERE|glassfish|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=
18;_ThreadName=Thread-1;|ApplicationDispatcher[/JsfEjbTest2] PWC1231: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6199: Generated servlet error:
string:///findProspectsDisplay_jsp.java:7: package org.joke.model does not exist
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:126)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:296)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:372)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:433)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1461)
...
I have spent a couple of days trying to fix this problem without success.
I have tried manually to use the glassfish/bin/jspc script and I still get the same JSP error that line 7 "package org.joke.model does not exist". I have tried putting jasper-jsr199.jar in my glassfish/lib directory and still the same error. I thought maybe my java version was just a JRE and this might be causing problems for the jsp compiler but when I looked at my windows program install it says I have installed the "Java(TM) SE Development kit 6 update 17" and "Java(TM) 6 update 17".
I have attached an ear file. I am a newbie to creating my own complete ear project. Please forgive my simplistic examples. I am just trying to get the basics down. Thank you.
Many thanks you for any help you can give me.
Michael Z
[Message sent by forum member 'michaelzzz' ]
http://forums.java.net/jive/thread.jspa?messageID=374958