Step 1: Download j2sdk and tomcat:
Step 2: install and configure your j2sdk and tomcat: Execute the j2sdk and tomcat installation programs and install them according to the default settings.
1. after installing j2sdk, You need to configure the environment variables, choose my computer> Properties> advanced> environment variables> system variables to add the following environment variables (assuming your j2sdk is installed in C: "j2sdk1.5.0 ):
Java_home = C: "Program Files" Java "jdk1.5.0 _ 06
Classpath =.; % java_home % "lib" DT. jar; % java_home % "lib" tools. jar; (.; must not be less, because it represents the current path)
Path = % java_home % "bin
2. after Tomcat is installed, add the following environment variables to my computer> Properties> advanced> environment variables> system variables (assuming that your Tomcat is installed in C: "Tomcat ):
Catalina_home = C: "Program Files" Apache Software Foundation "Tomcat 5.0 catalina_base = C:" Program Files "Apache Software Foundation" Tomcat 5.0
Modify the classpath in the environment variable, and append servlet. Jar under common "Lib in the Tomat installation directory to the classpath. The modified classpath is as follows:
Classpath =.; % java_home % "lib" DT. jar; % java_home % "lib" tools. jar; % catalina_home % "common" lib "servlet. jar;
Start Tomcat and access http: // localhost: 8080 in IE. If you see the welcome page of Tomcat, the installation is successful.
Environment configuration experience
First of all, we can use JDK + Tomcat to configure our JSP server. We don't need anything. Many articles have introduced Apache, but we don't need it at all, general learning and debugging of Tomcat is fully qualified.
After JDK is installed, Tomcat will automatically find the JDK installation path before installation, and click "Next" all the way. After a period of file copying, and finally "close", complete comcat installation.
You 'd better download a tomcat version with a higher version, such as 4.1 or above, because it does not need to set too many system variables, right-click "my computer ", select "property"-> "advanced"-> "environment variable"-> "system variable" to create a tomcat_home, and set the value to the path of your tomcat, for example, C: "Program Files" Apache Software Foundation "Tomcat 5.0
Problem: After the configuration is complete, enter http: // localhost: 8080 In the IE Address Bar and the test fails. It may be because port 8080 is occupied. Open C: "Program Files" Apache Software Foundation "Tomcat 5.0" conf directory,
<Connector Port ="8080"Maxthreads ="150"Minsparethreads ="25"Maxsparethreads ="75"Enablelookups ="False"Redirectport ="8443"Acceptcount ="100"DEBUG ="0"Connectiontimeout ="20000"Disableuploadtimeout ="True"/>
Change the Tomcat port to the unused port. You can try port 8081 or port 8000.