Development Environment

This lesson assumes the thick client Java Swing Applet is being developed within an Eclipse IDE.  Since it is part of an overall Struts-based system, the Eclipse project should be defined as a Tomcat project with StrutsIDE (or similar plugin) support added.  After that, there are several additional configurations needed.

First, a package for the applet classes is needed, such as yourlogin.appletprojectname.applet. The various client-side classes will be put into this package.

Second, a package for the servlet class(es) the applet will communicate with needs to be defined.  It might be named yourlogin.appletprojectname.servlet.  The servlet and any server-side support classes will be put into this package.

Third, the compiled versions of all of these classes must be accessible to the server, i.e., Tomcat, in this case.  The classfiles are all available under the WEB-INF/classes directory, but they are not directly addressable there by the server for loading by the applet.  Instead, classes accessed by the applet must be on the server's normal Web path.  One solution is to have directly under the project folder/context a folder such as appletprojectname, in my case abapplet.  Under it, create a directory structure to match the package structure.  Then, after each change/compile that alters one of these files, copy the upadated files from the Eclipse default WEB-INF/classes (sub)directory to this (sub)directory.