• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Java Applets as Application Clients  RSS feed

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently we got a new webserver "WebSphere Application Server 5.0"
it's EJB compliant so our code must go into EAR files and WAR files, etc. I got the WAR file stuff all figured out and I've been able to hit my servlets.
The problem is that our clients are all applets. Where does the applet's jar file go?
I've read the blue prints and EJB Clients "Application Clients" can be Applets. But it doesnt say where the classes.
I tried putting the jar file in the ear file at the same level of the war. but i wasn't able to access the jar file from the web. i had every thing setup like this.
test.ear
--META-INF
----application.xml
----ibm-application-ext.xmi
----MANIFEST.MF
--testserver.war
----META-INF
------MANIFEST.MF
------WEB-INF
--------classes
----------TestServlet.class
--------ibm-web-bnd.xmi
--------ibm-web-ext.xmi
--------web.xml
------AppletPage.html
--testclient.jar
----META-INF
------MANIFEST.MF
----TestApplet.class
This was constructed with "IBM WebSphere Application Developer 5.0"
I put a test response in the doGet method of the servlet and I can hit it but the html couldn't find the applet jar file. I ran the applet in appletviewer and it worked but I don't want the end user to have to do that.
My EAR Deployment descriptor looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
<application id="Application_ID">
<display-name>Test</display-name>
<module id="WebModule_1060004907688">
<web>
<web-uri>testserver.war</web-uri>
<context-root>/test</context-root>
</web>
</module>
<module>
<java>testclient.jar</java>
</module>
</application>
My web deployment descriptior looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp">
<display-name>TestServer</display-name>
<servlet>
<servlet-name>TestServlet</servlet-name>
<display-name>TestServlet</display-name>
<servlet-class>TestServlet</servlet-class>
<load-on-startup>-1</load-on-startup>
</servlet>
</web-app>
I type http://<ip-address>/test/AppletPage.html to test the applet.
My codebase is this: codebase="."
My archive is this: archive="testclient.jar"
I get a ClassNotFoundException on the applet.
 
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The applet .jar file needs to be accessible via a URL so you need to put it into one of the .war files (or make a dedicated applet.war).
 
Joshua Doerring
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putting the applet.jar file into the war worked out greak. Thanks for the help.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!