The following procedure is intended for Windows users only but if you are using a different OS, you should be able to install Tomcat with similar steps described here. If you are having trouble with a different OS, I suggest you follow the instructions for that platform.
The current Tomcat version, which is version 6.0.20(at the time of writing) supports JSP2.1 and servlet2.5 specifications.
Follow these steps to install and configure Tomcat
Download and Install Tomcat
- Go to http://tomcat.apache.org/
- Find the Download page for Tomcat6.x
- Scroll down to the Binary Distributions heading(it is also possible to use the source distribution but for the purpose of this article, I'm using the binary distribution)
- Under the Core subheading, click on the link for the zip file.
- Save it to your hard disk(its name should be something like apache-tomcat-6.0.20.zip).
- Extract it and move it to your C drive.
- Copy the following .jar files from Tomcat's lib directory(don't move, just copy-paste them) to the JDK's jre\lib\ext directory.
- servlet-api.jar
- jsp-api.jar
- el-api.jar
- tomcat-dbcp.jar
Set the JAVA_HOME environment variable
In recent versions of Tomcat, the sevlet engine is named Catalina. You will have to change a batch file called catalina.bat in order for this engine to work with JDK.- Open the apache-tomcat-6.0.20(in my case) directory.
- Open the directory named bin.
- Right-click the catalina.bat file and click "Edit" (this will open the batch file in a Notepad).
- Scroll down pass the remarks(they begin with the "rem" keyword).
- Immediately after the remarks, enter a "set" statement that sets the JAVA_HOME variable to the directory that contains the JDK of your system.
set JAVA_HOME=c:\Program Files\Java\jdk1.6.0
you should replace the part in red with the path relevant to your JDK. Don't leave any white space between the assignment operator(=)
6. Save your changes with catalina.bat file
7. Start Tomcat and test for some JSP pages.
0 comments:
Post a Comment