public class

JspAwareRequestContext

extends RequestContext
java.lang.Object
   ↳ org.springframework.web.servlet.support.RequestContext
     ↳ org.springframework.web.servlet.support.JspAwareRequestContext

Class Overview

JSP-aware (and JSTL-aware) subclass of RequestContext, allowing for population of the context from a javax.servlet.jsp.PageContext.

This context will detect a JSTL locale attribute in page/request/session/application scope, in addition to the fallback locale strategy provided by the base class.

Summary

[Expand]
Inherited Constants
From class org.springframework.web.servlet.support.RequestContext
[Expand]
Inherited Fields
From class org.springframework.web.servlet.support.RequestContext
Public Constructors
JspAwareRequestContext(PageContext pageContext)
Create a new JspAwareRequestContext for the given page context, using the request attributes for Errors retrieval.
JspAwareRequestContext(PageContext pageContext, Map<StringObject> model)
Create a new JspAwareRequestContext for the given page context, using the given model attributes for Errors retrieval.
Protected Methods
Locale getFallbackLocale()
This implementation checks for a JSTL locale attribute in page, request, session or application scope; if not found, returns the HttpServletRequest.getLocale().
final PageContext getPageContext()
Return the underlying PageContext.
void initContext(PageContext pageContext, Map<StringObject> model)
Initialize this context with the given page context, using the given model attributes for Errors retrieval.
[Expand]
Inherited Methods
From class org.springframework.web.servlet.support.RequestContext
From class java.lang.Object

Public Constructors

public JspAwareRequestContext (PageContext pageContext)

Create a new JspAwareRequestContext for the given page context, using the request attributes for Errors retrieval.

Parameters
pageContext current JSP page context

public JspAwareRequestContext (PageContext pageContext, Map<StringObject> model)

Create a new JspAwareRequestContext for the given page context, using the given model attributes for Errors retrieval.

Parameters
pageContext current JSP page context
model the model attributes for the current view (can be null, using the request attributes for Errors retrieval)

Protected Methods

protected Locale getFallbackLocale ()

This implementation checks for a JSTL locale attribute in page, request, session or application scope; if not found, returns the HttpServletRequest.getLocale().

Returns
  • the fallback locale (never null)

protected final PageContext getPageContext ()

Return the underlying PageContext. Only intended for cooperating classes in this package.

protected void initContext (PageContext pageContext, Map<StringObject> model)

Initialize this context with the given page context, using the given model attributes for Errors retrieval.

Parameters
pageContext current JSP page context
model the model attributes for the current view (can be null, using the request attributes for Errors retrieval)