Tomcat 7.0, Tomcat8.0 detailed installation configuration plots, and UTF-8 encoding configuration
Note: Installation configuration tomcat7.0 and above, you need to install JDK1.7 and above to support.
1. Download the tomcat compression package first Tomcat 7:http://tomcat.apache.org/download-70.cgi Tomcat 8: http://tomcat.apache.org/download-80.cgi
Download the appropriate version according to your system.
Unzip the downloaded package to a hard drive root directory, I unzip to the D packing directory.
2. Configure the Tomcat environment variable:
Right-click Computer---Properties-----advanced system Settings---environment variables
1, new user variable name: catalina_base, Variable value: D:\apache-tomcat-8.0.39 (optional)
1, new user variable name: tomcat_home, Variable value: D:\apache-tomcat-8.0.39 (optional)
2, new user variable name:catalina_home, variable value:D:\apache-tomcat-8.0.39 (required)
3, configure the Environment system variable path, add variable value:%catalina_home%\lib;%catalina_home%\bin
3. Start the Tomcat service:
Methods two kinds:
1, method One: Enter the command under the cmd command: Startup, the following dialog box appears, indicating that the service started successfully.
2, Method Two: Enter the command under the cmd command: Catalina Run, the following dialog box appears, indicating that the service started successfully.
4. Test Tomcat:
Open the browser, enter http://localhost:8080 carriage return in the address bar, and if you see a JSP page with Tomcat, your Tomcat has been built successfully.
5. You will also need to configure Tomcat's UTF-8 code last:
Open the Tomcat installation directory profile directory:D:\apache-tomcat-7.0.65\conf\server.xml Open the Server.xml file and modify this section (added uriencoding= "UTF-8 ", usebodyencodingforuri=" true ", modified connectiontimeout=" 60000 "):
<connector uriencoding= "UTF-8" port= "8080" protocol= "http/1.1" connectiontimeout= "60000" redirectport= "8443" Usebodyencodingforuri= "true"/>
6. Modify the publish path of the project in Eclipse (optional)
Deploying the project by default in eclipse will find that the published project is not found in the Tomcat WebApps directory, but in the Eclipse workspace directory
D:\Workspaces\eclipse_luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
Modify the publication properties of Tomcat in Eclipse. Double-click Tomcat v7.0 Server at localhost-1---"Server Locations"---Select the Project deployment path---"Deploy path"--Set the folder for the project deployment
① if configured as the first item, deploy the project to the workspaces directory so that eclipse will automatically replicate a tomcat in the temp directory. The advantage of this is that Tomcat will not have an impact on our installation and is more secure. The disadvantage is that the path is longer.
② if configured as the second item, the project is deployed to the Tomcat installation directory, typically in the WebApps directory in the Tomcat installation directory. The disadvantage is that all projects are common to one tomcat, and there may be an unstable situation. The advantage is that the path is short and easy to find. ③ if configured as a third item, deploy the project to a custom directory. The pros and cons are temporarily unknown. The general development of the individual is accustomed to using the first configuration.
At this point, the Tomcat installation configuration is complete.