I am trying to load an applet in my jsp. This is my problem, when I tried to do this from a html, I have placed the html inside web-inf. Now my jsp stays outside web-inf. If I specify the codebase as WEB-INF/classes I am getting an error class not found. Please advice me on how to proceed.
I now tried to make all my classes as a jar, and placed all supportive jars in the same directory where my jsp is. I am getting this error in my console.
ava.lang.NoClassDefFoundError: com/sun/org/apache/xml/internal/resolver/CatalogManager at com.sun.xml.ws.util.xml.XmlUtil.createDefaultCatalogResolver(XmlUtil.java:206) at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:103) at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:50) at javax.xml.ws.Service.<init>(Service.java:57) at com.neto2.attest.lgm.LogServices.<init>(LogServices.java:49)
Any help on this? :roll:
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35256
7
posted
0
The classes need to be in a publicly accessible directory. Anything inside WEB-INF will not be served to a browser, so putting classes there is not possible.
Can you suggest me some solution. I can create a jar with the classes, but I have all my library files inside WEB-INF lib folder. Should I have to have all the jars in 2 places? Advice me on this.
Ananth
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35256
7
posted
0
All the classes and jar files used by the applet need to be outside of WEB-INF. Remember that the servlet container and the applet are two separate JVMs with independent classpaths. Each needs to be set up so that it can get at all classes/kars it needs to run the code. For the applet that means a publicly accessible directory in the document hierarchy, while for the web app that means WEB-INF. They can't share directories.
java.lang.NoClassDefFoundError at com.sun.xml.ws.util.xml.XmlUtil.createDefaultCatalogResolver(XmlUtil.java:206) at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:103) at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:50) at javax.xml.ws.Service.<init>(Service.java:57) at com.neto2.attest.lgm.LogServices.<init>(LogServices.java:49) at com.neto2.attest.psd.PSDCanvas.loadPacketFileStream(PSDCanvas.java:352) at com.neto2.attest.psd.PSDCanvas.<init>(PSDCanvas.java:115) at com.neto2.attest.psd.PSD.<init>(PSD.java:77) at com.neto2.attest.psd.PSDApplet.PSDApplet(PSDApplet.java:51) at com.neto2.attest.psd.PSDApplet.init(PSDApplet.java:72) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35256
7
posted
0
The JAX-WS API is not part of J2SE, it's part of JEE 5. If the applet uses it then it will need to have the JEE jar files available (e.g. in the archive attribute of the applet tag).