Results 1 to 2 of 2

Thread: HttpServletRequest locale vs. LocaleContextHolder locale

  1. #1
    Join Date
    Feb 2012
    Posts
    9

    Default HttpServletRequest locale vs. LocaleContextHolder locale

    Hi,

    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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    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...
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •