Article directory
Attached is a tutorial on configuring Tomcat in Eclipse
Super detailed Ecilpse configuration Tomcat tutorial
1. Download Tomcat
First open the Tomcat official website. The home page address of the official website is
the home page address of the Tomcat official website.
After entering the official website, as shown in the picture below, select the version you want to install. The author here chooses to install the Tomcat 9 version, click Tomcat 9
Click on the red box as shown in the picture below to start downloading . The author here chooses the green version to download (that is, you need to configure the environment variables yourself after the download is completed). As for the other options, some experts on CSDN have discussed them in detail. Here the author (small Weak chicken-dog head saves life) I won’t introduce them one by one.
1.1 Installation of previous versions of Tomcat
If you want to install a version before Tomcat 9, we click Archives after entering the Tomcat 9 download interface
If we want to download a version before Tomcat 8, we need to first click on the Tomcat 8 download interface and then click Archives(Same for other versions)
For example, if we want to download version 9.0.8, we swipe down to find this version and click
Clickbin/Table of contents
Click on the red box as shown in the picture below to start downloading . The author here chooses the green version to download (that is, you need to configure the environment variables yourself after the download is completed). As for the other options, some experts on CSDN have discussed them in detail. Here the author (small I won’t introduce them one by one, so I will start downloading the compressed package of versions before Tomcat 9.
After the download is complete, unzip the compressed package to where you want to place it.
The author here unzips the compressed package to the D drive
2. Configure environment variables
After decompression is complete, start configuring system variables, right-click this computer -> click Properties
Click on Advanced system settings
Click on environment variables
Click New under the System Variables column
Create system variable name CATALINA_BASE
CATALINA_BASE
The variable value is D:\apache-tomcat-9.0.62 (This is the author’s decompressed path. Note: variable values can be viewed by browsing the directory! ! !)
variable value must beTomcat installation folder, do not go to the bin directory
D:\apache-tomcat-9.0.62
In the same way: create the system variable name CATALINA_HOME
CATALINA_HOME
The variable value is D:\apache-tomcat-9.0.62 (This is the author's decompressed path. Note: Check the variable values by browsing the directory! ! !)
variable value must beTomcat installation folder, do not go to the bin directory
D:\apache-tomcat-9.0.62
Double-click on the Path system variable
Click New
Create new %CATALINA_HOME%\lib
%CATALINA_HOME%\lib
Create new %CATALINA_HOME%\bin
%CATALINA_HOME%\bin
Then click OK
Win key + R key brings up the running interface, enter cmd and click OK to enter the cmd interface.
Enter the bin directory under tomcat (the path of my computer is D:\apache-tomcat-9.0.62\bin) and execute the "service.bat install" installation command. (Attachment: service uninstall command: service.bat remove)
Since my path is D:\apache-tomcat-9.0.62\bin,
first enter D: or d: to enter the D drive (remember to press Enter after completing the input!) If the E drive is e: or E:, then and so on
d:
Then enter cd D:\apache-tomcat-9.0.62\bin to enter the specified directory (the cd command means entering) (remember to press Enter after completing the input!)Note that the author’s bin directory path is D:\apache-tomcat-9.0.62\bin. Readers please follow the bin directory path on their own computers.
cd D:\apache-tomcat-9.0.62\bin
Finally, enter the service.bat install command (remember to press Enter after completing the input!)
service.bat install
After executing the installation instructions, as shown in the figure below
3. Start Tomcat
Double-click to open " tomcat9w.exe " in the bin folder under the tomcat decompression path , and click " Start " on the opened software interface .
When we see that the value of Service Status: is Started, it indicates that Tomcat has been started successfully.
In the same way, we can click Stop to shut down Tomcat. When the value of Service Status: is Stopped, it means that Tomcat has been shut down.
4. Test whether Tomcat starts successfully
Enter http://localhost:8080/ in the browser address bar
. If the following interface appears, it means that Tomcat has started successfully.
OK! Installation successful!