文章轉載自:http://blog.163.com/duanpeng3@126/blog/static/885437352009102241511837/
編輯工程的.project文件:
添加
<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>
到
<natures>
…
</natures>
eg.
例如將
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</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>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
在Eclipse中將Java Project轉換成Dynamic Web Project
選中項目右鍵,選擇“屬性”,在右窗口選擇“項目構面”,然後選擇“動態WEB”模塊,根據提示選擇要加的其它內容。OK
在Eclipse中打開“project properties",會看到新增了很多選擇項,點中"Project Facets",按下圖配置:
3. 項目即可成爲一個被WPT識別的項目。