users@glassfish.java.net

Re: JSP will not compile in GlassFish v3 (build 47.4)

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Mon, 07 Dec 2009 10:32:37 -0800

Michale,

On 12/07/09 10:11, glassfish_at_javadesktop.org wrote:
> hello Jan,
>
> Thank you for your quick response.
>
> I put Class-Path: EJBTest2.jar in my war MANIFEST.MF file and the jsp will still not compile ie. same result.
>

Did you update the WAR with the new manifest file?
As a sanity check, when you unpack the WAR and look at its manifest file,
does it contain the Class-Path attribute?
Did you update your EAR with the updated WAR?

> I also tried putting the EJBTest2.jar in the lib directory in the application.xml file and that did not work either ie. same compiler problem.
>
>

I'm not sure what you mean by "the lib directory in the application.xml".
You need to create a "lib" folder at the root of your EAR file and store the
JAR file(s) in it. No changes to the application.xml are required.

> I don't know if the following link says that my current problem is a current bug. It seems very similar to my problem. Although I am not using WAB files.
>
> http://forums.java.net/jive/thread.jspa?messageID=373758&#373758
>
> I am now trying to compile the jsps and put the compiled jsps in my war file. I hope this works, although this has not been an easy task to compile the jsps ie. I am still working on it. I will have to link the jsp with the compiled jsp in my web.xml file. But I wonder if glassfish will still try to compile it anyway and ignore the already compiled jsps ?
>
> Bottom line: the jsp compiler cannot find a class that is in another jar, my EJBTest.jar.
>

I just amended two of our existing web-related unit test:

https://svn.dev.java.net/svn/glassfish-svn/trunk/v2/appserv-tests/devtests/web/jspCustomTaglibJarInsideEarWithManifestClassPath

and

https://svn.dev.java.net/svn/glassfish-svn/trunk/v2/appserv-tests/devtests/web/jspCustomTaglibJarInsideEarWithoutManifestClassPath

with your scenario, and they're both passing.

Can you upload your latest EAR file to the forum?

Jan


> Is there anyone else out there who is using JSPs, JSFs or struts and has been successful in the compiling of these components with classes that are in other jars.
>
> I must be doing something really wrong given that many frontend of glassfish use JSPs, JSFs and struts. This is a show stopper for me. Sigh...
>
> Thank you very much for any help.
>
> Michale Z
> [Message sent by forum member 'michaelzzz' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=375203
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>