Tomcat configuration and some problems

Why should I write this article? Because I recently needed to build a backend, I thought of tomcat for the first time, but I encountered some small problems, so I wrote them down and recorded them.

1. http://tomcat.apache.org/, tomcat official website, download the appropriate tomcat according to your needs. I downloaded tomcat6.

2. Configure JDK environment variables. Those who do Java must have configured this. (Baidu Wenku has it)

3. Configure tomcat environment variables. Create a new "CATALINA_HOME" in the environment variable, content: the directory where your tomcat decompression is, for example, mine is: "D:\apache-tomcat-6.0.48-windows-x64\apache-tomcat-6.0.48", and then path Add "%CATALINA_HOME%\lib;%CATALINA_HOME%\bin". The main purpose of configuring this is to run tomcat wherever you open the startup in "D:\apache-tomcat-6.0.48-windows-x64\apache-tomcat-6.0.48\bin". You need to decide whether it is necessary.

4. Open "startup.exe" to run tomcat.

5. Open "http://localhost:8088/". If " If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! " appears, it means that tomcat has started successfully.


Here is a problem I encountered:

1. Localhost cannot be opened because the port number is occupied. Solution: Modify the port number, in the installation directory, conf—>server—>


<Connector port="8088" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />

port in.


2. I encountered a situation where I could still open localhost after closing tomcat. In fact, it was just the cache of the web page. If you don’t believe it, you can click status. The status can only be found when the server is open. To exit tomcat normally, just close the window.

Guess you like

Origin blog.csdn.net/health7788/article/details/56013297