Top Description Constructors Methods
org.springframework.web.servlet.handler

public Class DispatcherServletWebRequest

extends ServletWebRequest
Class Inheritance
Imports
java.util.Locale, jakarta.servlet.http.HttpServletRequest, .HttpServletResponse, org.springframework.web.context.request.ServletWebRequest, org.springframework.web.servlet.support.RequestContextUtils

ServletWebRequest subclass that is aware of org.springframework.web.servlet.DispatcherServlet's request context, such as the Locale determined by the configured org.springframework.web.servlet.LocaleResolver.
Author
Juergen Hoeller
Since
2.0
See Also
getLocale(), org.springframework.web.servlet.LocaleResolver

Constructor Summary

AccessConstructor and Description
public
DispatcherServletWebRequest(HttpServletRequest
current HTTP request
request
)

Create a new DispatcherServletWebRequest instance for the given request.

public
DispatcherServletWebRequest(HttpServletRequest
current HTTP request
request
,
HttpServletResponse
current HTTP response
response
)

Create a new DispatcherServletWebRequest instance for the given request and response.

Method Summary

Modifier and TypeMethod and Description
public Locale
Inherited from org.springframework.web.context.request.ServletWebRequest:
checkNotModifiedcheckNotModifiedcheckNotModifiedgetContextPathgetDescriptiongetHeadergetHeaderNamesgetHeaderValuesgetHttpMethodgetNativeRequestgetNativeRequestgetNativeResponsegetNativeResponsegetParametergetParameterMapgetParameterNamesgetParameterValuesgetRemoteUsergetUserPrincipalisNotModifiedisSecureisUserInRoletoString

Constructor Detail

DispatcherServletWebRequestback to summary
public DispatcherServletWebRequest(HttpServletRequest request)

Create a new DispatcherServletWebRequest instance for the given request.

Parameters
request:HttpServletRequest

current HTTP request

DispatcherServletWebRequestback to summary
public DispatcherServletWebRequest(HttpServletRequest request, HttpServletResponse response)

Create a new DispatcherServletWebRequest instance for the given request and response.

Parameters
request:HttpServletRequest

current HTTP request

response:HttpServletResponse

current HTTP response

Method Detail

getLocaleback to summary
public Locale getLocale()

Overrides org.springframework.web.context.request.ServletWebRequest.getLocale.

Implements org.springframework.web.context.request.WebRequest.getLocale.

Doc from org.springframework.web.context.request.WebRequest.getLocale.

Return the primary Locale for this request.

Annotations
@Override