Tomcat server download installation and configuration tutorial (using Tomcat in IDEA)

friendly reminder

First look at the article directory to get a general understanding of the structure of the knowledge points. You can directly click on the article directory to jump to the specified location of the article.

Chapter 1, Tomcat download and installation

1.1) Introduction to Tomcat

①Tomcat is a core project of Apache, jointly developed by Apache, Sun and some other companies and individuals.
②Tomcat server is a free and open source web lightweight application server, which is the first choice for developing and debugging JSP programs.
③Tomcat actually runs JSP pages and Servlets. Like Web servers such as IIS, Tomcat has the function of processing HTML pages. In addition, it is also a Servlet and JSP container. The independent Servlet container is the default mode of Tomcat.

1.2) Official website download

Tomcat official website download address: Official website download address
①Enter the official website: Select Tomcat9
insert image description here
②Select Windows version 64-bit
insert image description here
③Decompress and use directly after downloading, pay attention to the decompression path is best not in the C
insert image description here
drive
insert image description here

Chapter 2, Tomcat configuration environment variables

2.1) Windows environment variable configuration

①Win+E to open the manager –> This computer –> Properties
insert image description here
②Choose advanced system settings ③Choose
insert image description here
environment variables ④Create
insert image description here
new system variables ⑤Enter the variable name and the file path
insert image description here
downloaded and installed before, click OK %CATALINA_HOME%\bin
insert image description here

insert image description here

insert image description here

2.2) Verify that the Tomcat configuration is successful

Win+R, enter cmd and press Enter, and then enter startup.bat in the DOS window and press Enter.
The following interface appears to indicate success
insert image description here

2.3) Error resolution

①If an error occurs or it passes by in a flash, it may be that the default port number 8080 is occupied.
You can modify the port number in server.xml
insert image description here
② Modify the access port
Use Notepad or WordPad to open the file, find "Connector port=8080" in the file, change "8080" to the desired port number, save it, and restart the Tomcat server
insert image description here

Chapter 3, IDEA integrates Tomcat

3.1) Open the IDEA development tool

①Add Configuration—>click the plus sign—>find Tomcat server—>click local
insert image description here
②Select the Tomcat file location
insert image description here
③Put the project into a war package: select Department—>click the plus sign—>select Artifact—>Apply—>okinsert image description here

3.2) Run Tomcat

④Click the green triangle to run, Tomcat can be used in IDEA
insert image description here

Guess you like

Origin blog.csdn.net/baomingshu/article/details/131775933
Recommended