You are on page 1of 2

Instillation Procedure: After downloading, right click on the zip file and choose Extract All.

Browse to C:\Program Files; the extraction process will create the apache-tomcat-5.5.26 folder. If you extract the files to the default folder (which will be the folder where the zip file is located) just move the files to C:\Program Files\apache-tomcat-5.5.26 (some versions will be Jakarta-Tomcat). By default, your browser will be watching port 80 rather than 8080 which means you would have to type http://localhost:8080/ rather than http://localhost/ to check your work. The pre-configured version linked above includes the following change. You can change the port number from 8080 to 80 easily. Navigate to C:\Program Files\apache-tomcat-5.5.26\conf\ and open server.xml in a text editor (NotePad or WordPad). Do a search for 8080. There will be some comments that will catch the search first but following the comments you will find the actual instruction pointing to 8080. Changing it to 80 will match it to your browser's default. Create or change the system's Classpath variable to include the Tomcat jsp and servlet api's under the Control Panel --> System --> Advanced --> Environmental Variables. If a Classpath variable doesn't already exist, click on New and enter "CLASSPATH" in the variable name line. The Variable Value box should include the following: .;C:\Program Files\apache-tomcat-5.5.26\common\lib\servlet-api.jar;C:\Program Files\apachetomcat-5.5.26\common\lib\jsp-api.jar; The line in the Classpath above should begin with a period followed by a semi-colon. This allows subdirectories to be used in the Classpath. While you have the Environment Variable screen open, add C:\Program Files\apache-tomcat5.5.26\bin to the Path variable. Add another environment variable called "CATALINA_HOME" and point it to the Tomcat directory -- the default is C:\Program Files\apache-tomcat-5.5.26. Set JAVA_HOME. Set this environment variable to point at the top-level of your Java installation directory (e.g., C:\Program Files\Java\jdk1.5.0_08) set PATH="C:\Program Files\Java\jdk1.5.0_08\bin set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_08 Restart the workstation for environment variable changes to take effect. Test your setup as follows: Click on C:\Program Files\apache-tomcat-5.5.26\bin\startup.bat and see if a DOS window opens up and the server starts. You can right click on the startup.bat file and drag it to the desktop to create a shortcut (be careful not to move the actual file -- just create a desktop shortcut). Do the same with the shutdown.bat file also in the bin directory. This will make starting and stopping the Tomcat server much easier until you get the plugin working inside Eclipse. You should see a screen similar to this after a successful startup (some of the version numbers may have changed since this screen capture was created).

If you have problems, one way to discover their nature is to start Tomcat from a Command box by entering "startup.bat" (or C:\Program Files\apache-tomcat-5.5.26\bin\startup.bat if you didn't set the Path environmental variable above). The rather friendly error messages may provide an insight into the specific problem causing Tomcat to fail to start. Open a browser and type in a URL of http://localhost/. If everything's working you should see the Apache-Jakarta Tomcat welcome page. If the correct page doesn't open in the browser go back through and check all of the environment variables in the Control Panel for typos and omissions. Although you are operating in a Windows environment, the Java and Tomcat directories need only be present and pointed to correctly in the environment variables in either location. There aren't any other hidden connectors as you might expect in standard Windows components.

Congratulations if you see the Tomcat sample page!