Issues with Eclipse Development Web project WebContent WebRoot

Source: Internet
Author: User

Original: http://blog.sina.com.cn/s/blog_525960510100jo0j.html

When you recently made a Web project, you created a new Web project, such asWebdemo, eclipse default build path is build, Web-inf stored under webcontent, changed a build path and webcontent name, found that the project is not available,

1. The specific modification process has been webcontent change to WebRoot
2. Move the build path frombuild/classesSwitchwebdemo/webroot/web-inf/classes

The jar packages that were previously stored in Lib before the modification were stored in the Eclipse project'slibraries/web App LibrariesUnder the directory, after the change, the Web App Libraries becomes empty, and the tomcat6.x can not be recognized at boot time. Study the afternoon, finally find out the problem, today special sent out for later friends reference.

We open the project directory, under the root directory there is a. Settings\org.eclipse.wst.common.componentFile
When you create a new project, the following contents of this file are as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<project-modules id= "Modulecoreid" project-version= "1.5.0" >
<wb-module deploy-name= "Webdemo" >
<wb-resource deploy-path= "/" source-path= "/webcontent"/>
<wb-resource deploy-path= "/web-inf/classes" source-path= "/src"/>
<property name= "Context-root" value= "Webdemo"/>
<property name= "Java-output-path" value= "/webdemo/build/classes"/>
</wb-module>
</project-modules>

After the change, I found a missing sentence.<wb-resource deploy-path= "/" source-path= "/webcontent"/>, so we have to add it manually, the final correction after the content is as follows:

<?xml version= "1.0" encoding= "UTF-8"?>
<project-modules id= "Modulecoreid" project-version= "1.5.0" >
<wb-module deploy-name= "Webdemo" >
<wb-resource deploy-path= "/" source-path= "/webroot"/>
<wb-resource deploy-path= "/web-inf/classes" source-path= "/src"/>
<property name= "Context-root" value= "Webdemo"/>
<property name= "Java-output-path" value= "/webdemo/build/classes"/>
</wb-module>
</project-modules>

This allows our Eclipse Web project to run as before, and all the jars under the Lib package are automatically storedlibraries/web App LibrariesDirectory below.

Issues with Eclipse Development Web project WebContent WebRoot

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.