We first learn to install JDK and configuration and then install Tomcat and configuration. Finally, we learn to install Eclipse and configuration, as well as the use and publishing examples of web programs.
1. Install JDK and configure
JDK installation reference: JDK download, installation and deployment graphic tutorial
(1) Download the JDK installation package: //www.VeVB.COM/softs/325375.html
(2) Follow the steps and click next to install the JDK software.
(3) Configure the environment variables of JavaJDK**
The configuration environment variables include three parts: java_home, path and classpath
1) Right-click "My Computer" with the mouse and select "Properties" -> "Advanced" -> "Environment Variables" -> "System Variables" -> "New".
2) JAVA_HOME settings: Write "java_home" in the "Variable Name" input box, write "C:/Program Files/Java/jdk1.6.0" in the "Variable Value" input box (fill in according to the installation path), and then click "OK", and the java_home setting is completed.
3) Classpath setting: Select "System Variables" to see if there is a classpath item. If it does not, click "New". If it already exists, select the classpath option, click the "Edit" button, and then fill in "classpath" in the "Variable Name".
4) Path setting: Similar to the setting of "classpath", fill in "path" in the "Variable Name" input box, and fill in "C:/Program Files/Java/jdk1.6.0/bin" in the "Variable Value" input box (fill in according to the installation path).
5) The environment variables of JDK have been configured. You can confirm whether the installation is successful by opening the command prompt window, entering the command "java -version", and seeing the information about the Java version.
2. Install Tomcat and configure
http://tomcat.apache.org/
Download the tomcat installation version on the tomcat official website and then install the tomcat software. http://tomcat.apache.org/download-80.cgi#8.5.5
(1) Unzip the downloaded zip package to disk C: apache-tomcat-8.5.5
The directory after Tomcat installation is
bin-----------------------------------------------------------------------------------------------------------------------------
conf----Contains different configuration files
work----Storage class files generated after jsp compilation
The directory where the webapp stores the application
log------Storage log files
lib-------Storage jar files required by tomcat
doc-----Storage various Tomcat documents
(2) Settings of environment variables CATALINA_HOME, CATALINA_BASE, CATALINA_TMPDIR, path.
(3) Start Tomcat.
"Start" -> "Run" -> Enter cmd, enter startup.bat in the command prompt, and then the tomcat command box will pop up and output the startup log;
Or find the Tomcat installation path, find the bin folder, and manually click the startup.bat file.
Open the browser and enter http://localhost:8080/. If you enter the tomcat welcome interface, then congratulations on the configuration.
Reference information:
http://jingyan.baidu.com/article/870c6fc33e62bcb03fe4be90.html
//www.VeVB.COM/article/51909.htm
http://jingyan.baidu.com/article/86f4a73e5be03237d65269ef.html
(4) Software release If you use software, their default is to publish the project to the webapp folder of tomcat
C:/apache-tomcat-8.5.5/webapps
This part is not used yet.
3. Install Eclipse and configure
http://www.ibm.com/developerworks/cn/opensource/os-eclipse-tomcat/
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/neonr
Differences in Eclipse version:
//www.VeVB.COM/softjc/571159.html
Download the Eclipse IDE web version from the official website, then unzip it and put it locally.
Then, establish a link between the Eclipse IDE and tomcat.
(1) The option "servers" in the console location, create a new server in the console
4. Examples of the use and release of web programs
(1) Create a new web program and then test the working status of the server
new ->new project ->web -> dynamic web project
(2) Create a new index.jsp file, which will not be automatically generated by default.
<body> welcome to Eclipse for J2EE Developer Center, welcome! <%=new Date().toLocaleString() %></body>
(3) Release project:
Right-click to select the project, and run as