. Metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ wtpwebapps \ problem, tmp0wtpwebapps

Source: Internet
Author: User

. Metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ wtpwebapps \ problem, tmp0wtpwebapps

Configure the eclipse development environment, jdk installation path, and tomcat installation path. Create a Dynamic Web Project zhgy under eclipse. When you use a new tomcat in eclipse and start this tomcat to publish a Dynamic Web Project, in fact, the project is not released to the webapps directory where tomcat installation is located. This can be viewed in the webapps directory of the tomcat installation directory. From the console output at startup, the project is published to the following directory:

Information: Set web app root system property: 'webapp. root '= [D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ wtpwebapps \ zhgy \]

Open this directory and you can clearly see that there is a folder like zhgy, which is the project directory that we can access now.

Open D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. the core \ tmp0 \ directory contains the same structure as the D: \ Tomcat 6.0 directory, but a wtpwebapps directory is added. Actually, D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ This directory is a clone of eclipse's Directory D: \ Tomcat 6.0, so that D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ can also be used as the source server.

If there are several new servers, they will be in D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. multiple clone servers, such as temp0, temp1, and temp2, are displayed in the core \ directory. However, only one clone server can be started at a time, because they all use the same startup port (and, of course, the same closing port ).

This will bring us a lot of inconvenience. For example, for the above project, when we are developing, the project needs to put the uploaded images into the upload folder in the same directory of the project, the image is uploaded to the Directory D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ wtpwebapps \ upload \, but cannot access the uploaded image in the browser. At this time, we can manually copy the entire upload directory to D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \ webapps \, which can be accessed in the browser. This is because the default webapps directory of the tomcat server is the project directory rather than the wtpwebapps directory. To access D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. the zhgy project under core \ tmp0 \ wtpwebapps \ zhgy \ is because eclipse released the project through tomcat at D: \ workSpace-jx \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp3 \ conf directory server. the xml file has the following settings:

  1. Path = "/zhgy" reloadable = "true" source = "org. eclipse. jst. jee. server: zhgy"/>
        

    You can view the tomcat attributes created in eclipse, as shown in Server Locations:

    Manual copy can solve the problem, but it is really inconvenient. However, Server Locations in are gray and cannot be changed. In fact, it can be changed when eclipse creates a tomcat clone, but do not add any project to the new tomcat, and then right-click "open" on tomcat:

    You can see that the Server Locations option is no longer gray and can be edited:

    There are three options:

    1. Use the eclipse workSpace. The preceding example is D: \ workSpace \. metadata \. plugins \ org. eclipse. wst. server. core \ tmp0 \

    2. Use the tomcat installation directory. The preceding example is D: \ tomcat \

    3. Customize the path. Here, select the directory.

    You can also modify the Deploy path to define the directory in which the project is deployed to the container. For example, we can select Use Tomcat Installtion and set Deploy path to webapps:

    In fact, the simplest way is to modify the-Dwtp. deploy attribute of VM arguments. This attribute is located at: eclipse menu bar Run-> Run Configurations-> Arguments-> VM arguments.

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.