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

若转载请注明出处!若有疑问,请回复交流!
目录
相关文章
|
5月前
|
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.
|
开发框架 Java 应用服务中间件
eclipse中Tomcat version 9.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, and 8 Web modules
eclipse中Tomcat version 9.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, 7, and 8 Web modules
459 0
|
Java 应用服务中间件 Maven
解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
242 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.
4595 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.
1853 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.
12076 0
Setting Up a Server Cluster for Enterprise Web Apps – Part 1