How to configure Tomcat in the Eclipse environment and deploy the project to the Tomcat server
1. Open Eclipse, click on the "Window" menu and select "Preferences" below.
2. Click the "Server" option and select "Runtime Environments" below.
3. Click "Add" to add Tomcat.
4. Click "Next" to select your own tomcat path.
Click "Finish" to finish.
5. build a web App file→new→dynamic Web Project
6. have the Tomcat server appear on the console and deploy the Web app to Tomcat
Window→show view→servers
7. Click on the link No servers is available. Click ths link to create a new server. , in the dialog box that pops up, select Tomcat version
8. Click "Next" to add our project
Select the item and click Add, or double-click can be added to the right
Click "Finish" to complete
9. return to the "Servers" panel below, right-click on the "Tomcat v8.0 Server at localhost" node in the panel and click "Start" on the Popup shortcut menu
troubleshoot problems with no items in the Tomcat-webapp directory
Note :
Eclipse does not, like myeclipse, deploy the project to WebApps in the tomcat installation directory by default. Instead, the default deployment to the working directory
In the. Metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps ,thetmp1 folder contains information about the item.
How to modify it?
in order for the project to be deployed by default to WebApps in the Tomcat installation directory ,
Show View->servers-> Find the Tomcat to be modified -> Right-click
① Stop the Tomcat server within Eclipse (stop)
② Delete the items deployed in the container (add and remove)
③ clearing the container for data (clean)
④ opening The Tomcat's modify interface (open)
⑤ Find Serverslocation, select Second (User tomcat installation)
⑥ Modifying the deploy path to WebApps
⑦ Save Close
It is important to note that the ①②③ must be manipulated, otherwise the following steps are not configured to operate as.
Eclipse Configuration Tomcat Runtime Environment