更改 app.servlet.version 不会影响 web.xml
对于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来,您还需要更改
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 yourweb.xml
. Add the following line into a plain grails project and the web.xml will start with desired version 3.0: