Eclipse + Tomcat configuration in mac, unzip setomcat
Reprinted from Ghost
I haven't fully understood it yet, but the current version seems to have supported the establishment of the Tomcat server, but the following configuration is required to achieve it. You can also directly deploy the file in the Tomcat installation directory.
1. Install Eclipse...
2. install Tomcat... a little bit. Directory selection is very important.
3. Configure Tomcat in Eclipse.
3. Configure Tomcat in Eclipse to directly deploy the file to the Tomcat installation directory.
----------------------------------------------------------------------------
In the Servers view, double-click the newly added Wtp Tomcat server management configuration item to open the following interface:
A few red parts are important.
The default situation is:
If you do not modify the default value here, you can publish the web application to Tomcat and start running. The default value is as follows:
Synchronize the Tomcat configuration file managed by Eclipse to an Eclipse directory (deep). Tomcat starts with this configuration file without modifying the configuration file of the original Tomcat installation directory.
When a project is released, a compiled project code is copied to the \. metadata \. plugins \ org. eclipse. wst. server. core \ tmpN \ wtpwebapps \ directory.
We need to change it:
Here we need to modify it to enhance control over Tomcat. Sometimes we need to go to the physical installation directory of Tomcat to do some work. To be changed:
Synchronize the Tomcat configuration file managed by Eclipse to the conf directory in the physical installation directory of Tomcat, overwrite the configuration file in the conf directory of the original Tomcat installation directory, and enhance Tomcat control.
When a project is released, a compiled project code is copied to the webapps directory of Tomcat's physical installation directory.
Note:
As you can see, several key options are gray and cannot be operated, because there are released projects in the Wtp Tomcat server management configuration project.
First, clear the previously released project to perform the operation. Modify the image as shown in the image to achieve the goal.
Operation Management
--------------------------------------------------------------
In the Servers view, right-click the Tomcat server management configuration project of Wtp. The menu is as follows:
You can manage Tomcat running.
You do not need to stop the instance before restarting. Simply press start.
The "server" icon in the red line is "Publish to the server". It is used to Publish the Tomcat configuration file and is very important.
Cannot release a project to solve the problem
----------------------------------------------------------------------
Only "dynamic Web projects" can be "published" to tomcat. If your project cannot be "published", it is not "Dynamic Web project ".
Adjust as follows:
Right-click the item and select properties. The following window is displayed. set it to "Dynamic Web project" according to the operation ".
If the "target runtime cannot be found" error is reported during compilation, press and set "target RunTime ". You can.
Incomplete and need to be updated later