(Thanks to CS145 for most of the below.)
Compiling Servlets in Unix requires a few changes to your PATH and CLASSPATH environment variables. These changes have been made for you in the source file /usr/class/cs157/java/code/bin/all.env. Just type source /usr/class/cs157/java/code/bin/all.env. Alternatively, you can add this command to your .cshrc file.
Within your home directory you must set up the following directory structure:
servletdir
webpages
WEB-INF
servlets
A shell script to build this hierarchy is provided at /usr/class/cs157/java/code/bin/buildServletDirectory. (Note: If you add source /usr/class/cs157/java/code/bin/all.env to your .cshrc file, you can run buildServletDirectory by just typing the command.)
You should store .html pages within this structure, in the webpages directory. All Servlets (the java code) must be located in the servlets directory.
We are providing a sample program to demonstrate the basic functionality of Servlets and get you started with your programming. It is in the directory /usr/class/cs157/java/sample/
Please note that the instructions, code, and support we are providing are only tested on the leland Solaris machines. Copy the appropriate files to your own directory. All .html files should be placed in the webpages directory from Step 1. All .java files should be placed in the servlets directory.