The server does not support version 3.0 of the J2EE Web module specification
2015-09-04 09:38
369 查看
1.错误:
在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of the J2EE Web module specification
2.原因:
Tomcat 6.0最多支持Servlet 2.5,而现在要import的项目是3.0版本的。
3.解决方法:
在项目根目录下有一个.settings的文件夹,该文件夹下有一个org.eclipse.wst.common.project.facet.core.xml文件,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="java"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.6"/>
<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"/>
即可
第二种方法
直接使用tomcat8.X运行也是可以的,tomcat8.X对Servlet 3.X都支持
在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of the J2EE Web module specification
2.原因:
Tomcat 6.0最多支持Servlet 2.5,而现在要import的项目是3.0版本的。
3.解决方法:
在项目根目录下有一个.settings的文件夹,该文件夹下有一个org.eclipse.wst.common.project.facet.core.xml文件,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="java"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.6"/>
<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"/>
即可
第二种方法
直接使用tomcat8.X运行也是可以的,tomcat8.X对Servlet 3.X都支持
相关文章推荐
- 被骗了
- 网络层和运输层的区别
- Use the SVN command-line tool
- VBA 读取数据创建选择分支,输出txt文档
- 系统设计题
- C++单例模式的模板基类
- 【POJ2771】【最大二分匹配】【反向图最小独立集】
- AspectJ报错:error at ::0 can't find referenced pointcut XXX
- HDOJ 4501 小明系列故事——买年货 DP
- jquery实现浮动在网页右下角的彩票开奖公告窗口代码
- Microsoft Natural Ergonomic 4000 zoom改键
- Android OkHttp文件上传与下载的进度监听扩展
- Android - Fragment+ViewPager结合使用
- 好用的PL/SQL Developer相关设置
- UILabel的文字与 label 的中间线对齐方式
- Remove Linked List Elements
- android 4.4 支持透明状态栏和透明导航栏
- PHP 中使用 SOAP
- Android Studio安装遇到的问题总结
- 1001. A+B Format (20)