Configuring the Tomcat project in eclipse with the Tomcat plugin

Source: Internet
Author: User
Tags tomcat server

1. Install the Tomcat plug-in in eclipse (so that Tomcat can be started in eclipse)

2. Cultivate the Tomcat attribute in Eclipse,

Window-->preferences the Tomcat option in the dialog box,

Select the version, and the installation path (C:\Program Files\apache software Foundation\tomcat 5.0),

Note the context Declaration mode option: Server.xml and Context files,

Each represents the configuration of the two boot tomcat,

Generally choose the first kind,

Server.xml This configuration option automatically adds the code that launches the current project in Server.xml when the IS-a Tomcat project is selected for the item purpose:

<context path= "" reloadable= "true" docbase= "E:\myworkspace\myproject\WebRoot" workdir= "E:\myworkspace\myproject \work ">

<loader classname= "Org.apache.catalina.loader.DevLoader" reloadable= "true" debug= "1" Usesystemclassloaderasparent= "false"/>

</Context>

When you select the Server.xml option, the following configuration file is filled in:

C:\Program Files\apache Software Foundation\tomcat 5.0\conf\server.xml represents the path of Server.xml in Tomcat

When you select the context Files option, the following contexts directory is filled in:

C:\Program Files\apache Software Foundation\tomcat 5.0\conf\catalina\localhost

3. Configure the project's Tomcat property, right-click the project preferences in Eclipse, select the Tomcat option,

The is a Tomcat project tick, Can update context definition tick mark this context as reloadable tick,

Note the following subdirectory to set as Web application root:

/webroot, the system will automatically look for the Web. xml file under the Web-inf folder when the project is started.

Then select the DevLoader calsspath tab to select the imported plugin

4. In eclipse, add the project startup code for the Tomcat server.xml file.

Right-clicking the project again will see the Tomcat Project option-->update context definition (the system will add a boot code for Tomcat Server.xml)

Configuring the Tomcat project in eclipse with the Tomcat plugin

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.