Monday, March 10, 2008

How to change the default servlet version of Grails

Because Grails use Jetty as its default servlet container,so its default servlet version is "2.4".for some reason,may be we need to develop our application under the version 2.3 or 2.5 then how to change its default behavior?Then way is:
1)passs argument -Dservlet.version,for example:
>>grails -Dservlet.version=2.5 run-app
2)Or we can directly edit the Init.groovy file in directory Grails_Home/scripts.find the key "servletVersion" and change its default value from 2.4 to others what you want,for example:
servletVersion = System.getProperty("servlet.version") ? System.getProperty("servlet.version") : "2.5"

No comments: