Self-Summary after actual operations: it is not easy to successfully deploy a java web project using tomcat on windows. I found a lot of information on the Internet and tried it many times. I feel that it is either not comprehensive or not comprehensive. The following is a summary of my experiences in successfully deploying a java web project: steps/methods
- The first thing we need to do is to configure the Java development environment variables. For how to configure, see: 1.1Download jdk go to jdk official website download the latest jdk: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html1.2Install jdk and configure the variables java_home, path, classpath java_home = C: \ Program Files \ Java \ jdk1.6.0 _ 03 (jdk installation directory) path = % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin; (command search path) classpath = .; % JAVA_HOME % \ lib; % JAVA_HOME % \ lib \ tools. jar; % JAVA_HOME % \ lib \ dt. jar; (Class search path)
- After the environment variables are configured, you need to install tomcat: 2.1Go to tomcat Official Website: http://tomcat.apache.org/download suitable for windows tomcat to the local machine.2.2Decompress the package to a directory. (Equivalent to installation)
- After everything is configured, you need to put the java web project in tomcat: 3.1 after a web project is developed using development tools (we only discuss the use of myeclipse development tools), we use myeclipse to package it into a project file (*. war or *. ear ). Right-click the project file and select the "Export" menu in the pop-up menu. The result is as follows: Select whatever option under "J2EE" and click Next. The result is as follows: Select the Save directory, enter the file name, and click Finish. 3.2 find the generated project file in the selected directory and put the project file under webapps under the tomcat installation directory, just like this: D: \ tomcat6.0 \ apache-tomcat-6.0.32 \ webapps. 3.3 then start tomcat. Under the tomcat installation directory, find the startup File under the bin directory and click it to start tomcat. 3.4 next, enter the url in the browser to access what we want to access.
Notes
- Similar Self-summary is a coincidence.