Reputation: 31
I have Grails application with web.xml(src/templates/war/web.xml)
and I need to import there applicationContext.xml(WEB-INF/applicationContext.xml)
. Those files created by Grails and I want to use them, but I can not import applicationContext.xml to web.xml using classpath:WEB-INF/applicationContext.xml
.
I need something like this
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/web-app/WEB-INF/applicationContext.xml</param-value>
</context-param>
in my web.xml file, but Grails app classpath doesn't do this.
Upvotes: 1
Views: 591
Reputation: 31
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>file:web-app/WEB-INF/applicationContext.xml</param-value>
</context-param>
Grails uses this approach.
Upvotes: 2