Thanks for a thorough and informative answer!
I've implemented your suggestion, but I get a compile error when I try opening the JSP. This is the same problem I've had in all my attempts to use my bean classes from JSP.
My browser reports that the compiler cannot find the beans package. I have servlets within the war-file that are able to find the beans package, but the JSPs aren't.
My ear-file contains 3 files
ejb.jar
web.war
META-INF\manifest.mf
The manifest classpath points to ejb.jar and web.war
My guess is that this has something to do with the way this is deployed by GlassFish.
The application is deployed in the
domains\mydomain\applications\j2ee-apps\myear\
This directory contains the expanded files:
ejb_jar\
web_war\
META-INF
So the Java classes under web_war\ are able to see the Java classes under ejb_jar\
However; when GlassFish creates Java files from the JSPs and then tries to compile them, these files are placed under
domains\mydomain\generated\jsp\j2ee-apps\myear\web_war\org\apache\jsp\jsp
This might be correct for all I know, but apparently the compiler is unable to find the Java classes located under the mydomain\applications\.. directory when compiling classes located under the mydomain\generated\.. directory. There are no other files from my ear anywhere in the "generated" directory.
So to me this seems to be some kind of classpath problem, as the compiler cannot find the needed files.
Does this make any sense to you?
PS
In my ear, the JSPs are placed in the web.war. The war file looks like this:
[code]
jsp\
myjsp.jsp
META-INF
MANIFEST.MF
WEB-INF
web.xml
lib\
mylib.jar
[/code]
PPS
How do you get such nice markup on your pasted code?
Regards
Marius
[Message sent by forum member 'mariusw' (mariusw)]
http://forums.java.net/jive/thread.jspa?messageID=239253