First,Installing JDK 1.7
: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
1. Add environment variables: in My Computer--Properties---Advanced environment variables
2. New system variable, variable name: Java_home variable Value: C:\Program files\java\jdk1.7.0 (JDK installation directory)
3, in the original system variable path after the addition of English semicolon, and then add%java_home%\bin;%java_home%\lib\dt.jar;%java_home%\jre\bin; Do not delete the original. See clearly, the semicolon between them, is the semicolon in English.
4, restart the computer to take effect (because the system variables are added, if your system is win7, you do not need to restart).
4, test the JDK is installed successfully, run->cmd->d: Enter D, input javac see if can come out a lot of commands, out of the JDK configuration is successful.
Second, the installation of Tomcat 7.0 configuration
: http://tomcat.apache.org/download-70.cgi
1, Tomcat 7.0 of the installation-free version of the configuration (if the tomcat extracted to the C:\Program Files directory, the directory structure is: C:\Program files\apache-tomcat-7.0.11
1. Add environment variables: in My Computer--Properties---Advanced environment variables
2. New system variable, variable name: Catalina_home variable Value: C:\Program files\apache-tomcat-7.0.11 (the directory to which Tomcat extracted).
3. Add%catalina_home%\lib;%catalina_home%\lib\servlet-api.jar;%catalina_home%\lib\jsp-api.jar on the last side of the system variable path Notice the semicolon between them, which must be a semicolon in English.
4, Tomcat 7.0 administrator configuration, enter the C:\Program files\apache-tomcat-7.0.11 (Tomcat directory) under the Conf directory, edit Tomcat-users.xml, find the final:
<!--
<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"/>
-
In the above paragraph, add the following:
<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 is the added part. To this we should know the username and password of the administrator we added is the number of it!
5. Enter the bin directory under the Tomcat directory, double-click Startup.bat to start Tomcat in the Command line window will come out in English prompt.
6, Browser input: http://localhost:8080 can see the Tomcat welcome page that the configuration is successful, click on the upper right corner of the manager connection, enter the above configured user name and password, you can go to the Administration page.
Iii. integration of Tomcat to eclipse
Download Tomcat plugin: http://www.eclipsetotale.com/tomcatPlugin.html;
Download Tomcatpluginv33.zip, put the extracted folder com.sysdeo.eclipse.tomcat_3.3.0 into the Eclipse\plugin folder, restart Eclipse, Eclipse toolbar should have 3 Tomcat icon that corresponds to start, stop, and restart Tomcat services, respectively.
To start Tomcat normally from eclipse requires configuration:
Eclipse menu bar, Windows-Preferences Tomcat, set Tomcat version, Tomcat home, advanced Tomcat base, JVM Setti The JRE in NGS, Managerapp username and managerapp password in the Tomcat Manager app. Start the test from Eclipse.
Reference:
1. http://www.cnblogs.com/goto/archive/2012/11/16/2772683.html
Configuration of the Windows version of Tomcat 7.0