java 错误:服务器不支持 J2EE Web 模块规范的 3.1 版
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29997868/
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
error: The server does not support version 3.1 of the J2EE Web module specification
提问by Ankita Vibhandik
I want to run my java web services app on IBM bluemix server for deploying it on Bluemix. When I run it on bluemix server it gives an error: The server does not support version 3.1 of the J2EE Web module specification I tried changing version 3.1 but it is not allowing me to do so. please provide a solution
我想在 IBM bluemix 服务器上运行我的 Java Web 服务应用程序,以便在 Bluemix 上部署它。当我在 bluemix 服务器上运行它时出现错误:服务器不支持 J2EE Web 模块规范的 3.1 版 我尝试更改 3.1 版,但它不允许我这样做。请提供解决方案
采纳答案by Ram Vennam
WebSphere Application Server Liberty Profile does not currently have Web 3.1 project support. Set the web-app version to 3.0 in your web.xml like this:
WebSphere Application Server Liberty Profile 当前不支持 Web 3.1 项目。在您的 web.xml 中将 web-app 版本设置为 3.0,如下所示:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
回答by jpapejr
I don't know if it is supported but there is always the Tomcat Java build pack. You can try it by adding "java_buildpack" to your manifest as buildpack: java_buildpack or by adding it as a -b argument in your cf push
command.
我不知道它是否受支持,但总有 Tomcat Java 构建包。您可以尝试通过将“java_buildpack”作为 buildpack 添加到您的清单中:java_buildpack 或将其添加为您的cf push
命令中的 -b 参数。