The server does not support version 3.0 of the J2EE Web module specification

简介: 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版本的。

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都支持

若转载请注明出处!若有疑问,请回复交流!
目录
相关文章
|
27天前
|
Shell PHP Windows
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
|
应用服务中间件
Cannot change version of project facet Dynamic Web Module to 3.0
Cannot change version of project facet Dynamic Web Module to 3.0
Embedded web server initialization - jar file default-mimetypes.properties
Embedded web server initialization - jar file default-mimetypes.properties
115 0
Embedded web server initialization - jar file default-mimetypes.properties
|
Java 编译器 Maven
解决“Maven项目中的Dynamic Web Module 3.0 requires Java 1.6 or newer”问题
在Markers标签页中显示的错误为:Dynamic Web Module 3.0 requires Java 1.6 or newer.
193 0
解决“Maven项目中的Dynamic Web Module 3.0 requires Java 1.6 or newer”问题
|
Java 应用服务中间件 Maven
解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
217 0
解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
|
安全 网络协议 应用服务中间件
Setting Up a Server Cluster for Enterprise Web Apps – Part 3
In this three-part tutorial, we will discover how to set up a server cluster using Alibaba Cloud ECS and WordPress.
4577 0
Setting Up a Server Cluster for Enterprise Web Apps – Part 3
|
前端开发 应用服务中间件 网络安全
Setting up a Server Cluster for Enterprise Web Apps – Part 2
In this three-part tutorial, we will discover how to set up a server cluster using Alibaba Cloud ECS and WordPress.
1834 0
Setting up a Server Cluster for Enterprise Web Apps – Part 2
|
前端开发 网络协议 MySQL
Setting Up a Server Cluster for Enterprise Web Apps – Part 1
In this three-part tutorial, we will discover how to set up a server cluster using Alibaba Cloud ECS and WordPress.
12057 0
Setting Up a Server Cluster for Enterprise Web Apps – Part 1