Search code examples
eclipsejakarta-eeappletrad

RAD/WebSphere deployment of applet in web project


My web project will deploy with a Java applet. Within my workspace I have an applet, web (and jpa, ejb, ear, etc.) projects.

The applet should be deployed inside the war file in the directory as /applet/lib/applet.jar

Under the web project's properties->Deployment Assembly I added an entry for Source=applet project, Deploy Path=/applet/lib/applet.jar

When I export the war file from the project, the applet is included in the appropriate place. When I export the ear file from the project and look through the war file, the applet is in the appropriate place. If I manually deploy the ear file through WebSphere's admin console, the applet is deployed.

However, when I run the project through RAD, the applet is not to be found. I have cleaned, republished, restarted, uninstall/reinstalled the web application, performed voodoo magic to no avail.

What setting(s) am I missing to do this?


Solution

  • By default RAD is running projects from workspace and doesn't create ears, wars and jars. In most cases it is better as publishing is faster, but not in your case. You actually need your utility project as packed jar file.

    To fix that first remove project from the server, then double click your server in the Servers view and in the Publishing settings section switch to Run with resources on server. Save, restart server and republish your project.

    Then your applet project will be correctly packed as jar file and placed in the /applet/lib/applet.jar file.