Skip to content

Commit 2c45566

Browse files
committed
Default web servlet mapping should be /*. Fixes issues on Jboss.
1 parent 37d3e5b commit 2c45566

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

grails-core/src/main/groovy/grails/config/Settings.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,16 @@ interface Settings {
179179
*/
180180
String DEFAULT_RESOURCE_PATTERN = '/static/**'
181181

182+
/**
183+
* The default servlet path
184+
*/
185+
String DEFAULT_WEB_SERVLET_PATH = '/*'
186+
187+
/**
188+
* The default encoding
189+
*/
190+
String DEFAULT_ENCODING = System.getProperty('file.encoding',"UTF-8")
191+
182192
/**
183193
* Whether to log request parameters in the console
184194
*/

grails-plugin-controllers/src/main/groovy/org/grails/plugins/web/controllers/ControllersGrailsPlugin.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ class ControllersGrailsPlugin extends Plugin {
7777
String filtersEncoding = config.getProperty(Settings.FILTER_ENCODING, 'utf-8')
7878
boolean filtersForceEncoding = config.getProperty(Settings.FILTER_FORCE_ENCODING, Boolean, false)
7979
boolean dbConsoleEnabled = config.getProperty(Settings.DBCONSOLE_ENABLED, Boolean, Environment.current == Environment.DEVELOPMENT)
80-
String grailsServletPath = config.getProperty(Settings.WEB_SERVLET_PATH, '/')
80+
String grailsServletPath = config.getProperty(Settings.WEB_SERVLET_PATH, Settings.DEFAULT_WEB_SERVLET_PATH)
8181
int resourcesCachePeriod = config.getProperty(Settings.RESOURCES_CACHE_PERIOD, Integer, 0)
8282
boolean resourcesEnabled = config.getProperty(Settings.RESOURCES_ENABLED, Boolean, true)
8383
String resourcesPattern = config.getProperty(Settings.RESOURCES_PATTERN, String, Settings.DEFAULT_RESOURCE_PATTERN)
8484

8585
bootStrapClassRunner(BootStrapClassRunner)
8686
tokenResponseActionResultTransformer(TokenResponseActionResultTransformer)
8787

88-
def catchAllMapping = ['/*']
88+
def catchAllMapping = [Settings.DEFAULT_WEB_SERVLET_PATH]
8989

9090
characterEncodingFilter(FilterRegistrationBean) {
9191
filter = bean(CharacterEncodingFilter) {

0 commit comments

Comments
 (0)