Announcement Announcement Module
No announcement yet.
HttpServletRequest locale vs. LocaleContextHolder locale Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

    Thank you.

  • #2
    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...