更改app.servlet.version不会影响web.xml [英] Changing app.servlet.version does not affect web.xml
问题描述
在 app.servlet.version
为 3.0
是否存在问题> application.properties for grails 2.0?
Is there an issue to set the app.servlet.version
to 3.0
in the application.properties
for grails 2.0?
我创建了一个新的应用程序,添加了 app.servlet.version = 3.0
到 application.properties
并执行 grails war
(甚至试过 clean
之前)。然而,web.xml仍然以以下内容开头:
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">
我预计会看到3.0。我也用 2.4
尝试了这个Procedere,它仍然是 2.5
。它是错误的地方,我正在看?
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?
推荐答案
它看起来像,你需要改变 BuildConfig.groovy
,以便在 web.xml
中实现servlet版本3.0。将以下行添加到普通的grails项目中,web.xml将以所需的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"
这篇关于更改app.servlet.version不会影响web.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!