Tomcat deployment and startup environment configuration and tomcat deployment Environment
Win7 System Environment
Step 1:
Jdk1.7 Configuration
As follows:
JAVA_HOME = C: \ Program Files \ Java \ jdk1.7.0 _ 45
Path = % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;
CLASSPATH =. % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;
Step 2:
Tomcat configuration:
Create a ROOT directory under the webapps file, and copy the source code file after compilation of the project to be released.
Or
Directly use eclipse to select a project and export it as the ROOT. war package to webapps so that tomcat can automatically generate the corresponding folder. (Recommended)
As follows:
CATALINA_BASE = F: \ apache-tomcat-6.0.20
CATALINA_HOME = F: \ apache-tomcat-6.0.20
Path = % CATALINA_HOME % \ lib; % CATALINA_HOME % \ bin;
Step 3:
Restart the machine and the system environment variables take effect.
F: \ apache-tomcat-6.0.20 \ bin \ startup. bat Run in cmd
Or
In the bin directory, double-click the startup. bat file and the following two windows will pop up. The startup is successful!
If this step appears, you can only open the first window, that is, the second tomcat window will flash, please exit the 360 security guard and anti-virus software, you can get up or restart the machine.
Step 4:
Enter the following address in IE browser:
The web page is displayed normally !!! The web Service is accessible !!!!
After JDK environment variables are configured and TOMCAT is installed, TOMCAT needs to configure the environment.
You can configure JDK environment variables. tomcat does not need to configure environment variables.
To start a project, you must deploy the project to tomcat.
How to deploy it? Put the compiled java project under the webapp directory, and start tomcat to directly access the project. (I will not deploy online queries, many of them)
When tomcat runs, an error is reported. The environment variable has been set (the path does not contain Chinese characters), and the environment variable has been deployed and started.
The 404 page is not found,
You can see that the webapps/ROOT folder under your Tomcat and directory has been deleted...
If you want to run your website, enter: htpp: // localhost: 8080/myweb/index. jsp in your browser.
Myweb is the project name that you deploy to the webapps folder in tomcat.