-
1. Re: Unable to compile class for JSP
wolfgangknauf Jun 9, 2009 5:47 AM (in response to shenz)Hi Jim,
does your "Show.war" contain a file META-INF\Manifest.mf with this content?Manifest-Version: 1.0 Class-Path: Shop.jar
Best regards
Wolfgang -
2. Re: Unable to compile class for JSP
shenz Jun 9, 2009 6:10 AM (in response to shenz)Hi Wolfgang,
the Show.war contains a file META/MANIFEST.MF, but has the following content:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 11.2-b01 (Sun Microsystems Inc.)
It's the same content for both, working with JBOSS 4.2.2.GA as well as with JBOSS 5.1.0.GA
With JBOSS 4.2.2.GA a can call the index.jsp and Java classes called within this JSP are found and the JSP is compiled, but with JBOSS 5.1.0.GA I get the above mentioned error messages
org.apache.jasper.JasperException: Unable to compile class for JSP:
... cannot resolve to a type ..
Is there a way to get rid of tihis problems. Something important seeemed to be changed from JBOSS 4.2.2.GA to JBOSS 5.1.0.GA
Best wishes,
Jim -
3. Re: Unable to compile class for JSP
wolfgangknauf Jun 9, 2009 6:46 AM (in response to shenz)Hi Jim,
add the "Class-Path" to manifest.mf, as shown in my previous post:Manifest-Version: 1.0 Class-Path: Shop.jar
This is required for JBoss to resolve Shop.jar
Hope this helps
Wolfgang -
4. Re: Unable to compile class for JSP
shenz Jun 9, 2009 7:06 AM (in response to shenz)Hi Wolfgang
tyes this solves the problem, but because I've the according java classes which are called by the jsp I have to put in the MANIFEST.FM
Class-Path: Shop.war
Thx a lot!
Jim -
5. Re: Unable to compile class for JSP
wolfgangknauf Jun 9, 2009 8:53 AM (in response to shenz)Hi Jim,
this sounds strange. You mean you have to add "Shop.war" to the ClassPath of its own Manifest.mf?
Where do the classes in Shop.war reside? Normally, they should be in "WEB-INF\classes\".
Best regards
Wolfgang -
6. Re: Unable to compile class for JSP
shenz Jun 9, 2009 9:02 AM (in response to shenz)Hi Wolfgang,
yes I had to add "Shop.war", because the helper classes which are called from the index.jsp are located unter web/
i.e. the war file contains 2 directories
META-INF/
and
web/
and under web these helper classes are located.
Surely, the war file is packed in an EAR file named
Shop.ear which contains
it's own META-INF subdirectory, namely
META-INF/MANIFEST.MF
and
META-INF/application.xml
and the above mentioned war file Shop.war as well as a jar file Shop.jar where the entities and session beans are packed.
Best wishes,
Jim
WebShop.jar WebShop.war -
7. Re: Unable to compile class for JSP
wolfgangknauf Jun 9, 2009 9:43 AM (in response to shenz)Hi Jim,
it seems your app is not bundled according to the JavaEE spec.
It should be (taken your sample):Shop.ear |---META-INF\application.xml (this file is not required) |---Shop.jar |--META-INF\manifest.mf |--META-INF\ejb-jar.xml (optional) |--EJB classes and interfaces |---Shop.war |--META-INF\manifest.mf |--WEB-INF\web.xml |--WEB-INF\lib\yourlibraries.jar |--WEB-INF\classes\.... |--web\some.jsp
The "Shop.war" must not contain any classes which are already contained in "Shop.jar".
Seems the classes in your WAR are in the wrong location.
Hope this helps
Wolfgang -
8. Re: Unable to compile class for JSP
shenz Jun 9, 2009 10:22 AM (in response to shenz)H i Wolfgang,
thx. I'll try to adapt the right file and directory structure.
Many thanks for the hints which helped me.
Best,
Jim