Downloading of Tomcat and solving common errors (clicking startup.bat in Tomcat flashed past, 404, garbled problems appeared)

Tomcat is the basis of JavaWeb development, and all of our JavaWeb projects are basically released to run in Tomcat.

1. Download Tomcat;

1. Open Tomcat's official website, select the version you want to
Insert picture description here
Insert picture description here
download 2. Find the corresponding download package, and download;
Insert picture description here
3. Use the decompression tool to unzip the tomcat.zip
** Note: ** Do not have the Chinese
Insert picture description here
installation completed in the path ! ! !
Catalog description:

Insert picture description here
Click startup.bat in the bin file; start
Insert picture description here
successful sign:
enter local host: 8080 locally; appear
Insert picture description here

Solutions to common problems:

1. Click startup.bat in the bin file, and it flashes past.
Solution: Java environment is not installed properly

2. Enter localhost:8080 on the machine, and 404 appears;
Solution: Because port 8080 is occupied: ① occupied by other applications ② shut down tomcat/idea illegally. 404 may appear;
need to change the port number:
click on the conf/server.xml file and find the port modification:
Insert picture description here
3. Solve the problem of opening tomcat with garbled characters:
click on conf/logging.properties
Insert picture description here
because tomcat uses utf-8 and starts the command window used by tomcat It is GB2312, because of the encoding problem, it causes the garbled problem.

Guess you like

Origin blog.csdn.net/weixin_44436675/article/details/115214112