eclipse 服务器不支持 J2EE Web 模块规范的 3.0 版

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6922391/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:22:48  来源:igfitidea点击:

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

eclipse

提问by Hari

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

服务器不支持 J2EE Web 模块规范的 3.0 版。

I am getting this error when I execute an application in Eclipse IDE. What is the reason for this?

在 Eclipse IDE 中执行应用程序时出现此错误。这是什么原因?

回答by Karim Oukara

right click on your project -> Properties --> project Facetsthen you must change Dynamic Web Modulefrom 3 to 2.5

右键单击您的project -> Properties --> project Facets然后您必须Dynamic Web Module3 to 2.5

回答by Vineet Reynolds

The error message is quite understandable - you are attempting to execute an application that requires the server to support Servlet Spec 3.0 when it doesn't. You must therefore run the application on a server that complies with that version of the Servlet Specification.

错误消息很容易理解 - 您正在尝试执行一个需要服务器支持 Servlet Spec 3.0 的应用程序,但它不支持。因此,您必须在符合该版本 Servlet 规范的服务器上运行应用程序。

As far as I know you have the following options at your disposal, at the time of writing this:

据我所知,在撰写本文时,您可以选择以下选项:

  • Apache Tomcat 7.0
  • Glassfish 3.1
  • IBM WebSphere 8
  • JBoss 6 and 7
  • Resin 4
  • Apache Tomcat 7.0
  • 玻璃鱼 3.1
  • IBM WebSphere 8
  • JBoss 6 和 7
  • 树脂4

回答by bbreeden

The ...serverdef and plugin.xml configuration files for the server that you've set up in Eclipse define what versions of the specifications that the server supports.

您在 Eclipse 中设置的服务器的 ...serverdef 和 plugin.xml 配置文件定义了服务器支持的规范版本。

回答by Accollativo

From you web project try to downgrade the Dynamic Web Module: project -> Properties -> project Facets

从您的 web 项目尝试降级Dynamic Web Module:project -> Properties -> project Facets

If this has no effect, try to downgrade the EARfrom your EAR project: project -> Properties -> project Facets

如果这没有效果,请尝试EAR从您的 EAR 项目中降级:project -> Properties -> project Facets

If you can't change the versions from eclipse, edit manually the file org.eclipse.wst.common.project.facet.core.xml

如果您无法从 Eclipse 更改版本,请手动编辑该文件 org.eclipse.wst.common.project.facet.core.xml