Aug 8th, 2012, 10:29 AM
HttpServletRequest locale vs. LocaleContextHolder locale
I was just curious if anyone know why isn't the HttpServletRequest locale not set to the value resolved by the configured LocaleResolver at the beginning of the request, the same way the HttpServletResponse locale is set before rendering? I'm sure by now if it's not done, there's got to be a good reason, but I can't think of one.
Aug 9th, 2012, 07:59 AM
Because you cannot set the locale on the HttpServletRequest... Next to that the locale is also used in other parts of spring and if if wouldn't be available through other means (then only the httpservletrequest)the whole framework would depend on the srevlet api...