Onverting a Java project to a dynamic web project in eclipse (based on WTP, through project facets)
What's WTP?
Http://www.eclipse.org/projects/project_summary.php? Projectid = WebTools
Reference the eclipse web tools platform (WTP) project extends the eclipse platform with tools for developing web and Java EE applications. IT administrators des source and graphical editors for a variety of ages, wizards and built-in applications to simplify development, and tools and APIs to support deploying, running, and testing apps.
Converting a Java project to a dynamic web project in Eclipse:
Http://greatwebguy.com/programming/eclipse/converting-a-java-project-to-a-dynamic-web-project-in-eclipse/
Eclipse-Project facets:
Http://www.beilers.com/2009/05/eclipse-project-facets/
Import the myeclipse project to eclipse:
Http://todaydiy.blog.163.com/blog/static/104189687201021035312604/
Reference 1. Make sure that your eclipse version is javaee or you have installed the WTP plug-in.
2. Modify the. project file in the Eclipse project: XML code.
- <! -- Add <natures> </natures> -->
- <Nature> org. Eclipse. WST. Common. Project. facet. Core. Nature </nature>
- <Nature> org. Eclipse. WST. Common. modulecore. modulecorenature </nature>
- <Nature> org. Eclipse. Jem. workbench. javaemfnature </nature>
- <! -- Add it to <buildspec> </buildspec> -->
- <Buildcommand>
- <Name> org. Eclipse. WST. Common. Project. facet. Core. Builder </Name>
- <Arguments>
- </Arguments>
- </Buildcommand>
- <Buildcommand>
- <Name> org. Eclipse. WST. validation. validationbuilder </Name>
- <Arguments>
- </Arguments>
- </Buildcommand>
3. Refresh the project. Right-click the project and choose Properties> Project facets> modify project. Select Java and dynamic web module.
Configure the context root, content directory, and source code path.
A error:
Reference Java compiler level does not match the version of the installed Java project facet
Solution:
Http://www.eclipsezone.com/eclipse/forums/t80428.html
Reference
A wtp project is composed of multiple units of functionality (known as facets).
Take a look at project properties-> Project facets panel. The Java facet version needs to always match the Java compiler compliance level.
The best way to change Java level is to use the project facets properties panel as that will update both places at the same time.
Alternatively, when you get the error that you are referring to, there are quick fixes available to resolve it.