Obtain and Install the Servlet and JSP Development Kits
Your first step is to download software that implements the Java Servlet 2.1 or 2.2 and Java Server Pages 1.0 or 1.1 specifications. You can get a free version from Sun, known as the JavaServer Web Development Kit (JSWDK), at http://java.sun/products/servlet/ .
Next, you need to tell javac where to find the servlet and JSP classes when you compile a servlet file. The JSWDK installation instructions explain this, but it basically amounts to putting servlet.jar and jsp.jar (which come with the JSWDK) on your CLASSPATH . If you've never dealt with the CLASSPATH before, it is the variable that specifies where Java looks for classes. If it is unspecified, Java looks in the current directory and the standard system libraries. If you set it yourself, you need to be sure to include ., signifying the current directory. Here's a quick summary of how to set it on a couple of different platforms:
Unix (C Shell)
setenv CLASSPATH .: servlet_dir /servlet.jar: servlet_dir /jsp.jar Add :$CLASSPATH to the end of the setenv line if your CLASSPATH is already set, and you want to add more to it, not replace it. Note that you use colons to separate directories, while you use semicolons on Windows. To make this setting permanent, you'd typically put this statement in your .cshrc file.
Windows 95/98/NT
set CLASSPATH=.; servlet_dir /servlet.jar; servlet_dir /jsp.jar Add ;%CLASSPATH% to the end of the above line if your CLASSPATH is already set. Note that you use semicolons to separate directories, while you use colons on Unix. To make this setting permanent in Windows 95/98 you'd typically put this statement in your autoexec.bat file. On Windows NT, you'd go to the Start menu, select Settings, select Control Panel, select System, select Environment, then enter the variable and value.