eclipse3.6 default point to webcontent directory modification to webRoot setting description
url:http://ons.iteye.com/blog/717662
eclipse3.6 released, to the general use of MyEclipse feel incomparable card machine friend brought, and Eclipse loyal fans brought the gospel, a little use, let me have a body that it is so light, but has no inferior to the myeclipse function, Really worth a use, start fast, coding without card machine, memory footprint small, support a variety of application servers (including Tomcat 7.0), this is not just our use of myeclipse often encounter trouble?
In the use of Eclipse, I believe that everyone is more familiar than me (I usually use IntelliJ idea), the following explains how in the Eclipse Web project, how to set the Webroot directory pointing to the problem, I hope to be useful for beginners.
In eclipse3.6, it is the default point of WebRoot for webcontent directory, if our project WebRoot directory is not this name, but Webapp,web and other names? How do I set its point?
L First, Setup when creating a new project:
Next in the New dialog box, change the name of Content Directory to the name you want when you go to Web Module.
L Second, existing project settings, loading an existing Web project, when the project is in eclipse
1, add Web Facets, to the project root node, right button, select Properties, in the pop-up dialog box, select Project Facets, in the Right selection box, check the Java and Dynamic Web Module, and in the dynamic In the post-Web Module number, select the version of the JSP, which defaults to 3.0.
2, or in this interface, select, at this time, select the list below will appear "further Configuration availabe" link, click this link, set src and out path, Next, is the Web Module settings, the first item said, change The content directory name is your WebRoot directory name.
The following two steps are made when eclipse does not automatically make relevant settings for the imported project (that is, there is no. Settings folder under the project root), and if the project is imported, Eclipse automatically chooses Java and Dynamic Web Module, but with The relevant path is incorrect, what should we do?
One way: Delete the. Settings folder under the root of the project, refresh the item (be sure to refresh), and then proceed to the second 1, 2 minor steps. At this point, to increase the web Facets, the original √ will be cleared away, you can reset.
Another way: Change the configuration file, open the Org.eclipse.wst.common.component file under the. Setting folder, open with Notepad,
<wb-module deploy-name= "AMS" >
<wb-resource deploy-path= "/" source-path= "/webcontent"/>
<wb-resource deploy-path= "/web-inf/classes" source-path= "/src"/>
<property name= "Context-root" value= "AMS"/>
<property name= "Java-output-path" value= "/ams/webcontent/web-inf/classes"/>
</wb-module>
If you find the Red logo, change the blue-labeled folder directory to your Webroot directory name. If there is no red logo for this line, you can add it yourself.
While
The. jsdtscope file
<classpathentry kind= "src" path= "webcontent"/> synchronized with the above Source-path consistent
In the Org.eclipse.wst.common.project.facet.core.xml file
<installed facet= "java" version= "1.6"/> This line specifies the JDK version
<installed facet= "Jst.web" version= "2.5"/> This line specifies the Web version, which refers to the servlet and JSP, in addition, if the version of the Web is changed here, pay attention to sync the Web.xml The associated xmlns in;web-app> to the appropriate version
2.3------
<web-app id= "webapp_id" version= "2.3" xmlns= "HTTP://JAVA.SUN.COM/XML/NS/J2EE" xmlns:xsi= /xmlschema-instance "xsi:schemalocation=" Http://java.sun.com/xml/ns/j2ee Http://java.sun.com/xml/ns/j2ee/web-app _2_4.xsd ">
2.4------
<web-app id= "webapp_id" version= "2.4" xmlns= "HTTP://JAVA.SUN.COM/XML/NS/J2EE" xmlns:xsi= /xmlschema-instance "xsi:schemalocation=" Http://java.sun.com/xml/ns/j2ee Http://java.sun.com/xml/ns/j2ee/web-app _2_4.xsd ">
<installed facet= "Wst.jsdt.web" version= "1.0"/> This line specifies the JavaScript version