org.springframework.web.servlet.i18n
Class LocaleChangeInterceptor

org.springframework.web.servlet.handler.HandlerInterceptorAdapter
  |
  +--org.springframework.web.servlet.i18n.LocaleChangeInterceptor

public class LocaleChangeInterceptor
extends HandlerInterceptorAdapter

Interceptor that allows for changing the current locale on every request, via a configurable request parameter.

Author:
Juergen Hoeller
Since: 20.06.2003
See Also: LocaleResolver

Field Summary
 final static StringDEFAULT_PARAM_NAME
           

Method Summary
 booleanpreHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
           
 voidsetParamName(String paramName)
          Set the name of the parameter that contains a locale specification in a locale change request.

Methods inherited from class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
afterCompletion, postHandle

Field Detail

DEFAULT_PARAM_NAME

public final static String DEFAULT_PARAM_NAME
Method Detail

preHandle

public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws ServletException

setParamName

public void setParamName(String paramName)
Set the name of the parameter that contains a locale specification in a locale change request. Default is "locale".

Association Links

to Class java.lang.String

to Class java.lang.String