On 12/05/09 17:09, glassfish_at_javadesktop.org wrote:
> 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.
>
This is expected to work, and I've confirmed that it does.
I've downloaded your EAR file and checked the contents of
JsfEjbTest2.war#META-INF/MANIFEST.MF
and found that they look like this:
Manifest-Version: 1.0
i.e., there is no Class-Path attribute.
Try adding
Class-Path: EJBTest2.jar
and repackage your WAR and EAR files, and the compilation error should
go away.
Alternatively, try moving EJBTest2.jar to the default location for JAR files
inside EAR files, which is the "lib" folder under the EAR file's root.
With this approach, the contents of your EAR file would look like this:
META-INF/MANIFEST.MF
META-INF/application.xml
lib/EJBTest2.jar
JsfEjbTest2.war
instead of what you currently have:
META-INF/MANIFEST.MF
META-INF/application.xml
EJBTest2.jar
JsfEjbTest2.war
With this approach, you would not have to specify any Class-Path attribute
in your WAR file's manifest.
Jan
> Michael Z
> [Message sent by forum member 'michaelzzz' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=374958
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>