public ModelAndView handleRequest(final HttpServletRequest request, HttpServletResponse response) throws Exception {
final LocaleResolver localeResolver = (LocaleResolver)request.getAttribute(LOCALE_RESOLVER_ATTRIBUTE);
// Expose current LocaleResolver and request as LocaleContext.
LocaleContext previousLocaleContext = LocaleContextHolder.getLocaleContext();
if ( previousLocaleContext.getLocale() == null ) {
LocaleContextHolder.setLocaleContext(new LocaleContext() {
public Locale getLocale() {
return localeResolver.resolveLocale(request);
}
});