Deploy the Web project in eclipse to the Tomcat step

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/lucklq/article/details/7621807

Eclipse's web-to-Tomcat default deployment directory is under Project space, and this article is intended to change the deployment directory to the Tomcat installation directory and resolve the dependent package output issues.

1. Add the tomcat server in Eclipse.



2. Publish the Web project to Tomcat:

Select the tomcat you just added:



At this point eclipse will automatically generate the servers project:


3. In the servers view, remove deletes the item just released:



4. Open the Tomcat server configuration entry:



5. Modify the following two configuration items, Tomcat remains in the boot state, otherwise the server locations column is dimmed and unavailable:


6. Configure the LIB output.

Project Right-click:



Click Next and select the package that you want to publish to Tomcat with your project to complete the confirmation operation.


7. Modify the. classpath file under the project to bring the following configuration items to the front, otherwise the files previously published to Web-inf will be overwritten when the project is published:


8. Re-publish the project.

Read more: Eclipse launches Tomcat access to the home page

Transferred from: http://blog.csdn.net/guitk/article/details/8306987

When you configure Tomcat in eclipse to access the home page and access your own projects, what is the cause of the problem?

After reviewing the relevant information and knowing that after launching Tomacat in Eclipse, the Web project that it started was not a WebApp Web project under the Tomcat folder, but a Web project under one of its own folders in Eclipse.

Double-click the Tomcat server to open the Tomcat configuration page:

(Note: The server location for this figure needs to be enable when the Web project is not deployed in the Tomcat server)

The server path and location path are selected in the diagram. You can see that the default is "metadata with workspace", that is, the server path workspace, the specific path is: {workspace}\.metadata\.plugins\ ORG.ECLIPSE.WST.SERVER.CORE\TMP0, (new server, there will be a temp, the first server is TEMP0) Deploy path is Wtpwebapps. View this folder without the root project under Tomcat's WebApp, so of course you don't have access to Tomcat's homepage.

Workaround:

1. Copy the root under WebApp under Tomcat to the Wtpwebapps under E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0, Restart Tomcat and you'll be able to access the homepage now.

2. When configuring server locations, select the second item, "User Tomcat Installation" to modify the configuration such as:

Note: Configuring this step the project developed in Eclipse's workspace will also be copied to the selected deploy path when the Tomcat server is started.

Deploy the Web project in eclipse to the Tomcat step

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.