• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to load applet in jsp...

 
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Ananth
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok. Do you have any idea of what this error is?

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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you help me how to call a servlet to read a file and give all datas as a string or byte array. The file is available in the same server.

Ananth
[ December 11, 2007: Message edited by: Ananth Chellathurai ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please start a new thread for this unrelated topic.
 
Ananth Chellathurai
Ranch Hand
Posts: 349
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok. I will do it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic