tomcat installation and configuration (terminal and eclipse)

Download and install tomcat

On the premise of installing and configuring jdk, download the compressed package on the official website of tomcat (https://tomcat.apache.org/) and decompress it.
Since my jdk is version 8, tomcat also downloads version 8

Open the terminal in the bin directory, enter startup.bat
to open tomcat
insert image description here
, enter localhost:8080 in the browser, and you can see the tomcat interface

insert image description here
Close the terminal or ctrl+c key to close tomcat

Configure tomcat in eclipse j2ee:

j2ee configures the jdk file
window——preferences——

insert image description here

Call up tomcat's Visualizer:
window—show view—server
If not, then window—show view—other—server under server

insert image description here
The console has a server window:
insert image description here

Click the blue link below - select apache - select the installed tomcat version

insert image description here
Click next to configure the tomcat version and path:

insert image description here
Click Browse…, select the tomcat path,
click Workbench Default JRE, and change it to the version you installed

Click next, if there is no web related project, this is blank, click finish
insert image description here
. At this point, there is an additional tomcat server in the window.

insert image description here
Click on the tomcat server and modify the options:
1. Select "use tomcat installation" (by default, the web program developed in the future will be released to the tomcat installation directory);
2. Change the deployment path of the release directory to the webapps folder in the tomcat directory and
insert image description here
press CTRL+ s Save
tomcat and configure it

Verify:
In the server window, there are debug and run buttons. Debug on the left, run on the right, we click debug

insert image description here
In the console window , there will be information similar to those output in the terminal before

insert image description here
Enter url in the browser: localhost:8080, press Enter to see the tomcat page, the same as when you opened it with the terminal

insert image description here

Guess you like

Origin blog.csdn.net/qq_43523725/article/details/120614792