解决Cannot change version of project facet Dynamic Web M

dynamic web module 版本之间的区别:
Servlet 3.0 December 2009 JavaEE 6, JavaSE 6 Pluggability, Ease of development, Async Servlet, Security, File Uploading
Servlet 2.5 September 2005 JavaEE 5, JavaSE 5 Requires JavaSE 5, supports annotations
Servlet 2.4 November 2003 J2EE 1.4, J2SE 1.3 web.xml

错误Cannot change version of project facet Dynamic Web Module to 3.0:
在项目右键属性的Project facts中把Dynamci  Web  Module设置为 3.0,如果报错则直接修改项目文件:工程.settings目录下的 org.eclipse.wst.common.project.facet.core.xml,同时把web.xml开头设置为:

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" >

然后执行项目右键Maven的Update Project...即可。


参考http://my.oschina.net/cloudcoder/blog/362949?fromerr=7A8CmbH5


http://blog.sina.com.cn/s/blog_67e192090102v6u0.html

你可能感兴趣的:(解决Cannot change version of project facet Dynamic Web M)