You will need to download additional files before you can compile servlets.

Go to the download page for Sun's Java Servlets. In the "Java Servlets" section under "Specifications," you see a section called "2.3 - Final Release." You want to download both the class files and Javadocs. Both are in zip format.

This file does not need to be unzipped. Place it in the "lib" folder, which you will find inside the root installation folder for your JDK. You will also need to specify this zip file as part of the classpath when you compile. From the DOS window, mine would look like this:

javac -classpath ".;D:\jdk1.3\lib;D:\jdk1.3\lib\"

I use the -classpath switch, and enclose the paths between double-quote marks. I have three paths specified, separated by semi-colons:
  1. The "." indicates the current directory.
  2. The "D:\jdk1.3\lib" indicates the path to my "lib" directory.
  3. The "D:\jdk1.3\lib\" indicates the path to my servlet zip file.


Unzip this file in a convenient folder. It contains the documentation for the Servlet classes.