Configuration of Tomcat 7.0 for Windows
I,Install JDK 1.7
1. Add environment variables: choose my computer> Properties> advanced> environment variables.
2. Create a New System variable. variable name: java_home variable value: C: \ Program Files \ Java \ jdk1.7.0 (JDK installation directory)
3. Add a semicolon to the original system variable path and add % java_home % \ bin; % java_home % \ Lib \ DT. jar; % java_home % \ JRE \ bin; Do not delete the original. Clearly, the semicolons between them are English semicolons.
4. restart the computer (because the system variable is added. If your system is win7, you do not need to restart it ).
4. test whether the JDK is successfully installed. Run-> cmd-> D: Enter disk D and enter javac to check whether many commands are available. If so, JDK configuration is successful.
Ii. installation and configuration of Tomcat 7.0
1. Tomcat 7.0 installation-free configuration (if you extract tomcat to the C: \ Program Files directory, the directory structure is: C: \ Program Files \ apache-Tomcat-7.0.11
1. Add environment variables: choose my computer> Properties> advanced> environment variables.
2. Create a New System variable. The variable name is catalina_home. The variable value is c: \ Program Files \ apache-Tomcat-7.0.11 (the directory to which Tomcat is extracted ).
3. Add % catalina_home % \ Lib; % catalina_home % \ Lib \ servlet-api.jar at the end of the system variable path; % catalina_home % \ Lib \ jsp-api.jar pay attention to semicolons between them, it must be a semicolon.
4, Tomcat 7.0 administrator configuration, enter c: \ Program Files \ apache-Tomcat-7.0.11 (Tomcat directory) under the conf directory, edit the tomcat-users.xml, find the last:
<! --
<Role rolename = "Tomcat"/>
<Role rolename = "role1"/>
<User Username = "Tomcat" Password = "Tomcat" roles = "Tomcat"/>
<User Username = "both" Password = "Tomcat" roles = "tomcat, role1"/>
<User Username = "role1" Password = "Tomcat" roles = "role1"/>
-->
Add the following content after the preceding section:
<Role rolename = "Manager-Gui"/>
<Role rolename = "Admin-Gui"/>
<User Username = "admin" Password = "admin888" Roles = "Admin-Gui"/>
<User Username = "Tomcat" Password = "Tomcat" roles = "Manager-Gui"/>
Red indicates the add part. Here, we should know the username and password of the Administrator we have added!
5. Go to the bin directory under the Tomcat directory and double-click STARTUP. BAT to start Tomcat. An English prompt is displayed in the command line window.
6. Enter http: // localhost: 8080 in the browser. The welcome page of Tomcat is displayed, indicating that the configuration is successful. Click Manager connection in the upper right corner and enter the user name and password configured above, you can go to the Management page.
3. Integrate Tomcat into eclipse
Download Tomcat plug-ins: http://www.eclipsetotale.com/tomcatPlugin.html;
Download tomcatpluginv33.zip and unzip the obtained folder COM. sysdeo. eclipse. put tomcat_3.3.0 In the eclipse \ plugin folder and restart eclipse. The eclipse toolbar should have three Tomcat icons, corresponding to start, stop, and restart the Tomcat service.
To start Tomcat normally from eclipse, You need to configure:
eclipse menu bar-> window-> preferences-> tomcat, set tomcat version, Tomcat home, Tomcat base in advabced, JRE in JVM settings, managerapp username and managerapp password in Tomcat Manager app. Start the test from eclipse.