The server does not support version 3.0 of the J2EE Web module specification
报如下错误:The server does not support version 3.0 of the J2EE Web module specification
原来创建Test时用的是Tomcat 6.0,jdk都是用的1.6
Tomcat 6.0最多支持Servlet 2.5
解决如下:
在项目根目录下有一个.settings的文件夹,该文件夹下有一个org.eclipse.wst.common.project.facet.core.xml文件,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="java"/>
<installed facet="java" version="1.5"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
把<installed facet="jst.web" version="3.0"/>改为 <installed facet="jst.web" version="2.5"/>
本文介绍了一种常见的Tomcat6.0与J2EE Web模块规范版本不匹配的问题,并提供了详细的解决方案。通过调整项目配置文件中J2EE Web模块的版本设置,确保与服务器兼容。

1058

被折叠的 条评论
为什么被折叠?



