问题
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?
回答1:
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"
来源:https://stackoverflow.com/questions/8615596/changing-app-servlet-version-does-not-affect-web-xml