WebXmlConfig
87% of Grails users
Dependency :
compile ":webxml:1.4.1"
Summary
Add additional Features to your web.xml, such as Filters, Config Listeners or Context Parameter definitions
Description
WebXML Plugin
2011.12.02: Version 1.4
The plugin no longer auto-generatesThis release includes support for specifying the HTTP session timeout.grails-app/conf/WebXmlConfig.groovyon install. To create it run the new 'create-web-xml-config' script, e.g.grails create-web-xml-config
2011.11.23: Version 1.3/1.3.1
A new feature was added in this release to let other plugins specify a particular order of filters in web.xml. This is only necessary if your plugin's filters need to be in a particular position relative to those added by Grails or other plugins. To keep from explicitly linking plugins, this plugin defines a default position and position values for the filters added by Grails:static final int DEFAULT_POSITION = 500 static final int GRAILS_WEB_REQUEST_POSITION = 1000 static final int RELOAD_POSITION = 2000 static final int SITEMESH_POSITION = 3000 static final int URL_MAPPING_POSITION = 4000
getWebXmlFilterOrder() method that returns a Map where the keys are the names of filters, and the values are positions.Load the grails.plugin.webxml.FilterManager class dynamically inside this method to avoid plugin compilation order issues (the method is called after all of the plugins have been compiled).For example the Spring Security Core plugin definesdef getWebXmlFilterOrder() {
def FilterManager = getClass().getClassLoader().loadClass('grails.plugin.webxml.FilterManager')
[springSecurityFilterChain: FilterManager.GRAILS_WEB_REQUEST_POSITION + 100]
}def getWebXmlFilterOrder() {
def FilterManager = getClass().getClassLoader().loadClass('grails.plugin.webxml.FilterManager')
[DeclaredResourcesPluginFilter: FilterManager.DEFAULT_POSITION - 300,
AdHocResourcesPluginFilter: FilterManager.DEFAULT_POSITION - 250,
ResourcesDevModeFilter: FilterManager.RELOAD_POSITION + 100]
}2008.12.09: Version 1.2
This plugin enables a Grails application to control certain aspects of the web.xml file generated by Grails without having to resort to editing the web.xml template file or having to write a plugin in order to use the plugin doWithWebDescriptor closure.This plugin provides a set of features that can be enabled to add items to the web.xml file. It installs a File WebXmlConfig to your conf directory with samples in it.This list of supported features include:- FilterChainProxy Delegator: this features installs a org.springframework.web.filter.DelegatingFilterProxy pointing to a FilterChainProxy bean. The bean can then be configured by the application's resources.groovy file.
- Add Config Listeners
- Add Context Parameters