File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Java Applets as Application Clients Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Java Applets as Application Clients" Watch "Java Applets as Application Clients" New topic

Java Applets as Application Clients

Joshua Doerring

Joined: Aug 08, 2003
Posts: 19
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.
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" "">
<application id="Application_ID">
<module id="WebModule_1060004907688">
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" "">
<web-app id="WebApp">
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.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
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).

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Joshua Doerring

Joined: Aug 08, 2003
Posts: 19
Putting the applet.jar file into the war worked out greak. Thanks for the help.
wood burning stoves
subject: Java Applets as Application Clients
Similar Threads
ejb/war deployment
Problem accessing a servlet in weblogic
struts/jboss/tomcat application not working
Deploying ear file in Weblogic8.1
error delploying ear file on JBOSS 3.0.8