http://tomcat.apache.org/download-60.cgi
32-bit Windows zip
save to folder of your choice
unzip
define JAVA_HOME:
Click on the Start icon and the right click on the "Computer" icon
Select properties
Select the Advanced system settings
You may have to authenticate as .\localmgr with the apprpriate password, most likely your Kerberos password
Select the "Advanced" tab
Click the "Environment Variables" button
Under System Variable, click New
Enter the variable name as JAVA_HOME
Enter the variable value as the install path for the Development Kit, in my case that is: C:\Program Files\Java\jdk1.6.0_20
Click OK a couple of times
restart your computer
find bin folder, run startup.bat
open up a web-browser and go to: http://localhost:8080
Click on servlets examples and check whether everything works properly
Adding your own servlet:
Copy the form.html file and place it in webapps/examples/servlets
Copy the script.java file to an Eclipse workspace.
Copy the javax.servlet.jar file to C:\Program Files\Java\jdk1.6.0_20\jre\lib\ext\ (or equivalent)
Add this jar file to your project: Go to Project, Properties, Libraries and add the jar file as an "external jar file"
Go to: Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
and under "Deprecated and restricted API" change the selection under "Forbidden reference" to "Warning" or "Ignore"
Compile it (this should happen automatically) (it won't run)
Copy the script.class file to webapps/examples/WEB-INF/classes
Edit the web.xml file found in webapps/examples/WEB-INF/
Add the following two elements:
In the section:
add:
Script
Script
In the section following it, add:
Script
/servlets/servlet/Script
restart tomcat
open: http://localhost:8080/examples/servlets/form.html