更改 app.servlet.version 不会影响 web.xml

发布于 2024-12-22 18:21:18 字数 691 浏览 0 评论 0原文

对于 grails 2.0,在 application.properties 中将 app.servlet.version 设置为 3.0 是否存在问题?

我创建了一个新应用程序,将行 app.servlet.version=3.0 添加到 application.properties 并执行 grails war (甚至尝试了<代码>干净之前)。然而,web.xml 的开头仍然是:

<web-app         xmlns="http://java.sun.com/xml/ns/javaee" 
               version="2.5" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

我本来期望看到 3.0。我还用 2.4 尝试了这个 Procedere,它仍然是 2.5。难道是我看错地方了?

Is there an issue to set the app.servlet.version to 3.0 in the application.properties for grails 2.0?

I created a new app, added the line app.servlet.version=3.0 to the application.properties and executed grails war (even tried clean before). However the web.xml still starts with:

<web-app         xmlns="http://java.sun.com/xml/ns/javaee" 
               version="2.5" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Iwould have expected to see 3.0. I also tried this Procedere with 2.4 and it is still 2.5. Is it the wrong place, which I am looking at?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满地尘埃落定 2024-12-29 18:21:18

看起来,您还需要更改 BuildConfig.groovy,以便在 web.xml 中实现 servlet 版本 3.0。将以下行添加到普通的 grails 项目中,web.xml 将从所需的版本 3.0 开始:

grails.servlet.version = "3.0"

It looks like, that you need to change the BuildConfig.groovy as well, in order to achieve servlet version 3.0 in your web.xml. Add the following line into a plain grails project and the web.xml will start with desired version 3.0:

grails.servlet.version = "3.0"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文