Tomcat environment configuration and tomcat Environment
This document describes how to install tomcat.
What is tocmat? Why?
The Tomcat server is a free open-source Web application server, which is a lightweight application server. It is widely used in small and medium systems and concurrent users, is the first choice for developing and debugging JSP programs. For details, see Baidu encyclopedia.
Installation tutorial
Tocmat Official Website
1. Download an object
The green version is selected for small editors. After decompression, you can directly configure some environment variables.
2. Configure Environment Variables
Computer properties, advanced system settings, advanced environment variables, system variables, path, edit, variable values-Add the decompressed path of tomcat to the bin layer and do not forget the ";"!
Then, open the "startup. bat" file in the binfile under the tomcat installation path, and set "CATALINA_HOME" at the top of the file. The content after the equal sign is the decompress path of tomcat. This makes it easier to configure environment variables.
[Plain]View plain copy
- Set CATALINA_HOME = D: \ java \ apache-tomcat-7.0.73-windows-x64 \ apache-tomcat-7.0.73
4. Test
Test whether the installation is successful. Run cmd in win + R and enter startup. bat keeps the dos window open. In the address bar of the browser, enter http: // localhost: 8080 or http: // 127.0.0.1: 8080. The following figure is displayed, the operation is successful!
5. Problems
If not, I am very happy to start another wave of tests. Find out the error. First, check the log file. In the decompressed path of tomcat, select the file closest to the modification date to open the file and check the error information --"Severe: Failed to initialize end point associated with ProtocolHandler [" http-apr-8080 "]".
6. Solve the error
In fact, this error is because the port is occupied. Just change it.
Solution 1
In the tocmat installation path, select the server in the conf file. open the xml file, press Ctrl + F to find 8080, and change it to another port. I will tell you how to change it to 8888. No other ideas, Geely !! That's why xiaobian succeeded !!!
Solution 2
In fact, there is another solution: Open the task manager and check whether there is a Java W thread in it. Turn it off and restart tomcat.
[Summary]
The installation of tocmat is really a small series of tears, clearly what others have done in ten minutes, xiaobian spent a whole afternoon. I was once skeptical about the computer problem. I was almost excited and re-installed it. Fortunately, I did not give up on it and finally ushered in the bright future! It makes sense that this process is simple. Some people may make the same mistake as xiaobian. I hope this article will help you.