Reputation: 16294
Grails 2 documentation says that is it possible, but Grails 3 documentation didn't says nothing about.
How can I add a custom web.xml and weblogic.xml to a Grails 3 application war?
Upvotes: 0
Views: 2580
Reputation: 2789
I just came across this from the JavaOne talk that Graeme Rocher gave on October 24, 2015. It looks like web.xml
is no longer supported.
Here is the the video, it's about one hour into the presentation. (Slides are available for download on the site). Here are some screenshots from the presentation:
Upvotes: 1
Reputation: 518
Grails 3.x does not use web.xml. Customizations must be done in Spring. New servlets and filters can be registered as Spring beans or with ServletRegistrationBean and FilterRegistrationBean respectively.
Documentation for configuring Spring Beans in Grails: https://grails.github.io/grails-doc/3.0.x/guide/spring.html
Information gathered from http://grails.github.io/grails-doc/latest/guide/single.html#upgradingApps
The article does mention, poorly worded, "although it is still possible to have on in src/main/webapp/WEB-INF/web.xml"
Try creating a web.xml file located in src/main/webapp/WEB-INF/ and see if this solves your issue.
In previous version of grails you could run:
grails install-templates
This would generate the web.xml grails uses to build your application.
Upvotes: 1