Problem Description: Java and Tomcat are the basics when doing Java Web-related projects under Windows, documenting the configuration of the Java environment and the installation and configuration of Tomcat.
Tools: Windows, JDK installation packages, tomcat9.0 installation packages.
Action steps are as follows:
1, the configuration of the Java environment variables.
Download and install jdk-> My Computer right--> properties-> "Advanced system Settings"-> "Environment variables", create the following three variables (existing for editing):
Java_home:c:\program files\java\jdk1.8.0_111//JDK installation path to the top level of the bin.
Classpath:%java_home%\lib\tools.jar;
Path:%java_home%\bin;%java_home%\jre\bin; Run "Java", "Javac", "java-version" under CMD, and if the installation succeeds, no error message will appear.
2, tomcat9.0 installation.
After downloading Tomcat to the location you want to install, with the configuration of the Java environment variables, create the following four variables (existing to edit):
Tomcat_home:c:\program files\tomcat//tomcat installation path to the top level of the bin.
Catalina_home:c:\program Files\tomcat/ditto
Path:%catalina_home%\bin
Classpath:%catalina_home%\lib\servlet-api.jar
After configuration, in cmd CD to C:\Program Files\tomcat\bin, run "service install TOMCAT9" command.
Entering "http://localhost" in the browser address bar shows the following screen even if the installation succeeds:
3, Tomcat's default port is 8080, if you want to modify the port, in the "conf" folder to find "Server.xml", the file in the "Connector port= ' 8088" "8080 modified for their own port number, save after the restart Tomcat can be.
Reprint Link: https://www.cnblogs.com/lwjboke/p/7089126.html