How to run Tomcat Server on Windows
Tomcat is the way to go if you want to work on jsp or other web based Java programs. However you will not always want to buy a JSP webhost package in order to practice Java programs unless you have a friend who owns the web hosting company. Simplest and fastest way (and also free) is to download Tomcat server and install it on your laptop / desktop PC. There are several issues faced by users and they are not able to configure it properly, so here is the step by step guide to successfully run Tomcat:
First of all, some downloads.
1. Download Latest JDK from oracle.com
2. Download Tomcat from tomcat.apache.org
Now first install JDK. Copy tomcat folder in the same drive. Suppose you have installed JDK in C:\Program files\JDK1.7.0 then you can put tomcat in C:\tomcat . When you are done with this part, you have one last thing to do and that is to set environment variables.
To set environment variables, right click on your My Computer icon on desktop and click Properties. In the new window that open click on Advance tab and then click on the Environment Variables button. Now in the window you will see two placed to enter variables, at that top which will say user variables and below system variables. You can enter variables in any one of these. If you have multiple user account set up and you want tomcat to run only for your account then I would suggest entering values in user variables otherwise in system variables. If you enter in system variables, please restart your computer otherwise the entered environment variables will not work. Enough of lecture, here are the variables in order of (variable name: variable values) :-
CATALINA_HOME: C:\tomcat
CLASSPATH: C:\Program Files\Java\jdk1.7.0\lib;C:\tomcat\lib\servlet.jar
JAVA_HOME: C:\Program Files\Java\jdk1.7.0
JRE_HOME: C:\Program Files\Java\jre7
TOMCAT_HOME: C:\tomcat
When entering these variables make sure that the corresponding parth does exist in your system by browsing the files and folder. When all done, just go to the bin folder in tomcat and double click the startup.bat file. Now server will start and you can check it by entering http://localhost:8080 in your web browser. To shutdown server, double click shutdown.bat

