Eclipse deploys a Java Web project with the Tomcat plugin

Source: Internet
Author: User

Eclipse version 3.7.2,tomcat plugin is 3.3

The detailed steps are as Follows:

1. Download Tomcatplugin Plugin

Tomcatpluginhttp://download.csdn.net/detail/kingsonl/4249870

After extracting the file into Eclipse's plugins, restart Eclipse to see the Tomcat icon indicating that the installation was Successful.

2. Add service services Tomcat as Follows:

first, Add the Tomcat service (contexts directory is the project deployment Location)

Then add toncat base (if This step does not add the error, the service is not Found)

3 . This is the most critical step in determining whether your deployment project is Successful.

Under your installed tomcat, such as: D:\apache-tomcat-7.0.55\conf\Catalina\localhost This file to create the Xx.xml file (xx is the name of the project you created ) Xx.xml file contents such as:

<context path= "/fcsx" docbase= "D:\Tomcat-7.0.69\webapps\fcsx" reloadable= "true" debug= "0"/>

4, Click the Eclipse tomact icon, start normal, in the browser input you want to access the items such as my local access path: localhost:8080/test/test, can access the instructions correctly.

5, or you can: right-click on your project--properties (properties)--tomcat--general options

1. Tick This is a Tomcat project (is a Tomcatproject)

2.Content name is called Project Engineering name for Example:/test
3. Check to update the Server.xml file (canupdate context definition (servaer.xml RO context File)
4. Use this context tag to reload (reloadable= "true") (mark this context as Reloadable)
5.Extra Infomation Write your project location, such as under Webroot or webcontent

The 5th step is to complete the project Deployment.

At this point, "D:\apache-tomcat-7.0.54\conf\Catalina\localhost" under the Tomcat path found an XML file with the project name, such as "sowell_server.xml", The contents are consistent with step 3, as Follows:

The XML file content is: consistent with step 3 manual Generation.

Click the Tomcat icon to deploy the Web project to access the project in the browser to see if the access is successful such as my local access Path: http://localhost:8080/Sowell_server/error.jsp, The following indicates the Access Success.

Note: If you visit the project at the time of the 404 error (404 error is usually the wrong path), under Tomcat under the Conf->catalina->localhost also has no project compiled XML file, then do the Following: project right-〉 Properties-〉java build path->source, which has a default output folder below, This place should be set to:

Project Name/webroot/web-inf/classes

Eclipse deploys a Java Web project 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.