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