Tomcat download

Tomcat download address

Generally do not download the new version, download the more stable version is better, I download Tomcat 9 here

Click Tomcat 9 on the left to download to the download page

  • Mirros can replace the mirror source, or if it’s too slow, you can replace it, but the file itself is not big enough to be over 10 megabytes
  • Select the appropriate version in Core, 64bit-Windows Zip for 64 Windows, and TAR for Linux
  • There are also Source files under the Source Code

Download contains a directory called Archive. You can download it in the bin directory

Then download and unzip to the specified directory

Tomcat configuration

Tomcat is written in Java and requires a JVM to run, so you need to configure the JDK, and if you don’t configure the following environment, it will fade away

Create the system variable JAVA_HOME ——–> onment of your JDK installation directory (e.g. : D:\ Devevironment \ OpenJDK-11.0.2)

Click Path and create a new type: %JAVA_HOME%/bin

Open: Then enter the bin directory under the decompression directory of Tomcat 9, click the startup. BAT batch file, and the startup time will appear to open Tomcat

Go to the browser and type: http://localhost:8080 or press to open…

Close: directly click the console to close, or enter the bin directory and click shutdown. Dat

Another console garbled situation

Click the console title bar, properties, you can see that it is GBK encoding, and Tomcat console is UTF-8 encoding, so there will be garbled code

You can choose to change the encoding of the console in the registry, or you can change the encoding of Tomcat

To do this, I changed the Tomcat encoding:

Into the tomcat installation directory/conf/logging. The properties and use notepad to open, CTRL + f search Java. Util. Logging. ConsoleHandler. Encoding = utf-8, changed to GBK code can, Restart Tomcat

Tomcat directory introduction

  • The bin mainly holds binary executables and scripts.
  • Conf mainly holds various configuration files.
  • The lib is used to store the JAR packages that Tomcat needs to load to run.
  • Logs mainly hold log files generated by Tomcat during runtime.
  • Temp mainly holds temporary files generated by Tomcat while it is running.
  • WebApps is the main store of applications, and Tomcat will load the applications in that directory when it starts.
  • Work mainly holds Tomcat compiled files at run time, such as compiled files for JSPs.

——- will be updated later