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
, enter localhost:8080 in the browser, and you can see the tomcat interface
Close the terminal or ctrl+c key to close tomcat
Configure tomcat in eclipse j2ee:
j2ee configures the jdk file
window——preferences——
Call up tomcat's Visualizer:
window—show view—server
If not, then window—show view—other—server under server
The console has a server window:
Click the blue link below - select apache - select the installed tomcat version
Click next to configure the tomcat version and path:
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
. At this point, there is an additional tomcat server in the window.
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
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
In the console window , there will be information similar to those output in the terminal before
Enter url in the browser: localhost:8080, press Enter to see the tomcat page, the same as when you opened it with the terminal