Java Doc for RequestContext.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » servlet » support » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.web.servlet.support 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.web.servlet.support.RequestContext

All known Subclasses:   org.springframework.web.servlet.support.JspAwareRequestContext,
RequestContext
public class RequestContext (Code)
Context holder for request-specific state, like current web application context, current locale, current theme, and potential binding errors. Provides easy access to localized messages and Errors instances.

Suitable for exposition to views, and usage within JSP's "useBean" tag, JSP scriptlets, JSTL EL, Velocity templates, etc. Necessary for views that do not have access to the servlet request, like Velocity templates.

Can be instantiated manually, or automatically exposed to views as model attribute via AbstractView's "requestContextAttribute" property.

Will also work outside DispatcherServlet requests, accessing the root WebApplicationContext and using an appropriate fallback for the locale (the JSTL locale if available, or the HttpServletRequest locale else).
author:
   Juergen Hoeller
since:
   03.03.2003
See Also:   org.springframework.web.servlet.DispatcherServlet
See Also:   org.springframework.web.servlet.view.AbstractView.setRequestContextAttribute
See Also:   org.springframework.web.servlet.view.UrlBasedViewResolver.setRequestContextAttribute
See Also:   RequestContext.getFallbackLocale



Field Summary
final protected static  StringAPPLICATION_SCOPE_SUFFIX
    
final public static  ThemeDEFAULT_THEME
     Default (empty) Theme used if the RequestContext cannot find a ThemeSource.
final public static  StringDEFAULT_THEME_NAME
     Default theme name used if the RequestContext cannot find a ThemeResolver.
final public static  StringJSTL_LOCALE_ATTRIBUTE
     JSTL locale attribute, as used by JSTL implementations to expose their current locale.
final protected static  StringREQUEST_SCOPE_SUFFIX
    
final protected static  StringSESSION_SCOPE_SUFFIX
    

Constructor Summary
public  RequestContext(HttpServletRequest request)
     Create a new RequestContext for the given request, using the request attributes for Errors retrieval.
public  RequestContext(HttpServletRequest request, ServletContext servletContext)
     Create a new RequestContext for the given request, using the request attributes for Errors retrieval.
public  RequestContext(HttpServletRequest request, Map model)
     Create a new RequestContext for the given request, using the given model attributes for Errors retrieval.
public  RequestContext(HttpServletRequest request, ServletContext servletContext, Map model)
     Create a new RequestContext for the given request, using the given model attributes for Errors retrieval.
protected  RequestContext()
     Default constructor for subclasses.

Method Summary
public  BindStatusgetBindStatus(String path)
     Create a BindStatus for the given bind object, using the "defaultHtmlEscape" setting.
Parameters:
  path - the bean and property path for which values and errorswill be resolved (e.g.
public  BindStatusgetBindStatus(String path, boolean htmlEscape)
     Create a BindStatus for the given bind object, using the "defaultHtmlEscape" setting.
Parameters:
  path - the bean and property path for which values and errorswill be resolved (e.g.
public  StringgetContextPath()
     Return the context path of the original request, that is, the path that indicates the current web application.
public  ErrorsgetErrors(String name)
     Retrieve the Errors instance for the given bind object, using the "defaultHtmlEscape" setting.
public  ErrorsgetErrors(String name, boolean htmlEscape)
     Retrieve the Errors instance for the given bind object.
protected  LocalegetFallbackLocale()
     Determine the fallback locale for this context.
protected  ThemegetFallbackTheme()
     Determine the fallback theme for this context.
final public  LocalegetLocale()
     Return the current locale.
public  StringgetMessage(String code, String defaultMessage)
     Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
public  StringgetMessage(String code, Object[] args, String defaultMessage)
     Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
public  StringgetMessage(String code, List args, String defaultMessage)
     Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
public  StringgetMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape)
     Retrieve the message for the given code.
public  StringgetMessage(String code)
     Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
public  StringgetMessage(String code, Object[] args)
     Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
public  StringgetMessage(String code, List args)
     Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
public  StringgetMessage(String code, Object[] args, boolean htmlEscape)
     Retrieve the message for the given code.
public  StringgetMessage(MessageSourceResolvable resolvable)
     Retrieve the given MessageSourceResolvable (e.g.
public  StringgetMessage(MessageSourceResolvable resolvable, boolean htmlEscape)
     Retrieve the given MessageSourceResolvable (e.g.
protected  ObjectgetModelObject(String modelName)
     Retrieve the model object for the given model name, either from the model or from the request attributes.
public  StringgetQueryString()
     Return the query string of the current request, that is, the part after the request path.
final protected  HttpServletRequestgetRequest()
     Return the underlying HttpServletRequest.
public  StringgetRequestUri()
     Return the request URI of the original request, that is, the invoked URL without parameters.
final protected  ServletContextgetServletContext()
     Return the underlying ServletContext.
final public  ThemegetTheme()
     Return the current theme.
public  StringgetThemeMessage(String code, String defaultMessage)
     Retrieve the theme message for the given code.
public  StringgetThemeMessage(String code, Object[] args, String defaultMessage)
     Retrieve the theme message for the given code.
public  StringgetThemeMessage(String code, List args, String defaultMessage)
     Retrieve the theme message for the given code.
public  StringgetThemeMessage(String code)
     Retrieve the theme message for the given code.
public  StringgetThemeMessage(String code, Object[] args)
     Retrieve the theme message for the given code.
public  StringgetThemeMessage(String code, List args)
     Retrieve the theme message for the given code.
public  StringgetThemeMessage(MessageSourceResolvable resolvable)
     Retrieve the given MessageSourceResolvable in the current theme.
public  UrlPathHelpergetUrlPathHelper()
     Return the UrlPathHelper used for context path and request URI decoding.
final public  WebApplicationContextgetWebApplicationContext()
     Return the current WebApplicationContext.
protected  voidinitContext(HttpServletRequest request, ServletContext servletContext, Map model)
     Initialize this context with the given request, using the given model attributes for Errors retrieval.
public  booleanisDefaultHtmlEscape()
    
public  voidsetDefaultHtmlEscape(boolean defaultHtmlEscape)
     (De)activate default HTML escaping for messages and errors, for the scope of this RequestContext.
public  voidsetUrlPathHelper(UrlPathHelper urlPathHelper)
     Set the UrlPathHelper to use for context path and request URI decoding.

Field Detail
APPLICATION_SCOPE_SUFFIX
final protected static String APPLICATION_SCOPE_SUFFIX(Code)
JSTL suffix for application-scoped attributes



DEFAULT_THEME
final public static Theme DEFAULT_THEME(Code)
Default (empty) Theme used if the RequestContext cannot find a ThemeSource.



DEFAULT_THEME_NAME
final public static String DEFAULT_THEME_NAME(Code)
Default theme name used if the RequestContext cannot find a ThemeResolver. Only applies to non-DispatcherServlet requests.

Same as AbstractThemeResolver's default, but not linked in here to avoid package interdependencies.
See Also:   org.springframework.web.servlet.theme.AbstractThemeResolver.ORIGINAL_DEFAULT_THEME_NAME




JSTL_LOCALE_ATTRIBUTE
final public static String JSTL_LOCALE_ATTRIBUTE(Code)
JSTL locale attribute, as used by JSTL implementations to expose their current locale. Used as fallback in non-DispatcherServlet requests; if not available, the accept-header locale is used (request.getLocaleSame as the FMT_LOCALE constant in JSTL's Config class, but not linked in here to avoid a hard-coded dependency on JSTL. RequestContext does not depend on JSTL except for this fallback check of JSTL's locale attribute.
See Also:   javax.servlet.jsp.jstl.core.Config.FMT_LOCALE
See Also:   javax.servlet.http.HttpServletRequest.getLocale



REQUEST_SCOPE_SUFFIX
final protected static String REQUEST_SCOPE_SUFFIX(Code)
JSTL suffix for request-scoped attributes



SESSION_SCOPE_SUFFIX
final protected static String SESSION_SCOPE_SUFFIX(Code)
JSTL suffix for session-scoped attributes




Constructor Detail
RequestContext
public RequestContext(HttpServletRequest request)(Code)
Create a new RequestContext for the given request, using the request attributes for Errors retrieval.

This only works with InternalResourceViews, as Errors instances are part of the model and not normally exposed as request attributes. It will typically be used within JSPs or custom tags.

Will only work within a DispatcherServlet request. Pass in a ServletContext to be able to fallback to the root WebApplicationContext.
Parameters:
  request - current HTTP request
See Also:   org.springframework.web.servlet.DispatcherServlet
See Also:   RequestContext.RequestContext(javax.servlet.http.HttpServletRequest,javax.servlet.ServletContext)




RequestContext
public RequestContext(HttpServletRequest request, ServletContext servletContext)(Code)
Create a new RequestContext for the given request, using the request attributes for Errors retrieval.

This only works with InternalResourceViews, as Errors instances are part of the model and not normally exposed as request attributes. It will typically be used within JSPs or custom tags.

If a ServletContext is specified, the RequestContext will also work with the root WebApplicationContext (outside a DispatcherServlet).
Parameters:
  request - current HTTP request
Parameters:
  servletContext - the servlet context of the web application(can be null; necessary for fallback to root WebApplicationContext)
See Also:   org.springframework.web.context.WebApplicationContext
See Also:   org.springframework.web.servlet.DispatcherServlet




RequestContext
public RequestContext(HttpServletRequest request, Map model)(Code)
Create a new RequestContext for the given request, using the given model attributes for Errors retrieval.

This works with all View implementations. It will typically be used by View implementations.

Will only work within a DispatcherServlet request. Pass in a ServletContext to be able to fallback to the root WebApplicationContext.
Parameters:
  request - current HTTP request
Parameters:
  model - the model attributes for the current view(can be null, using the request attributes for Errors retrieval)
See Also:   org.springframework.web.servlet.DispatcherServlet
See Also:   RequestContext.RequestContext(javax.servlet.http.HttpServletRequest,javax.servlet.ServletContext,Map)




RequestContext
public RequestContext(HttpServletRequest request, ServletContext servletContext, Map model)(Code)
Create a new RequestContext for the given request, using the given model attributes for Errors retrieval.

This works with all View implementations. It will typically be used by View implementations.

If a ServletContext is specified, the RequestContext will also work with a root WebApplicationContext (outside a DispatcherServlet).
Parameters:
  request - current HTTP request
Parameters:
  servletContext - the servlet context of the web application(can be null; necessary for fallback to root WebApplicationContext)
Parameters:
  model - the model attributes for the current view(can be null, using the request attributes for Errors retrieval)
See Also:   org.springframework.web.context.WebApplicationContext
See Also:   org.springframework.web.servlet.DispatcherServlet




RequestContext
protected RequestContext()(Code)
Default constructor for subclasses.




Method Detail
getBindStatus
public BindStatus getBindStatus(String path) throws IllegalStateException(Code)
Create a BindStatus for the given bind object, using the "defaultHtmlEscape" setting.
Parameters:
  path - the bean and property path for which values and errorswill be resolved (e.g. "person.age") the new BindStatus instance
throws:
  IllegalStateException - if no corresponding Errors object found



getBindStatus
public BindStatus getBindStatus(String path, boolean htmlEscape) throws IllegalStateException(Code)
Create a BindStatus for the given bind object, using the "defaultHtmlEscape" setting.
Parameters:
  path - the bean and property path for which values and errorswill be resolved (e.g. "person.age")
Parameters:
  htmlEscape - create a BindStatus with automatic HTML escaping? the new BindStatus instance
throws:
  IllegalStateException - if no corresponding Errors object found



getContextPath
public String getContextPath()(Code)
Return the context path of the original request, that is, the path that indicates the current web application. This is useful for building links to other resources within the application.

Delegates to the UrlPathHelper for decoding.
See Also:   javax.servlet.http.HttpServletRequest.getContextPath
See Also:   RequestContext.getUrlPathHelper




getErrors
public Errors getErrors(String name)(Code)
Retrieve the Errors instance for the given bind object, using the "defaultHtmlEscape" setting.
Parameters:
  name - name of the bind object the Errors instance, or null if not found



getErrors
public Errors getErrors(String name, boolean htmlEscape)(Code)
Retrieve the Errors instance for the given bind object.
Parameters:
  name - name of the bind object
Parameters:
  htmlEscape - create an Errors instance with automatic HTML escaping? the Errors instance, or null if not found



getFallbackLocale
protected Locale getFallbackLocale()(Code)
Determine the fallback locale for this context.

The default implementation checks for a JSTL locale attribute in request, session or application scope; if not found, returns the HttpServletRequest.getLocale(). the fallback locale (never null)
See Also:   javax.servlet.http.HttpServletRequest.getLocale




getFallbackTheme
protected Theme getFallbackTheme()(Code)
Determine the fallback theme for this context.

The default implementation returns the default theme (with name "theme"). the fallback theme, or null




getLocale
final public Locale getLocale()(Code)
Return the current locale.



getMessage
public String getMessage(String code, String defaultMessage)(Code)
Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
Parameters:
  code - code of the message
Parameters:
  defaultMessage - String to return if the lookup fails the message



getMessage
public String getMessage(String code, Object[] args, String defaultMessage)(Code)
Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message, or null if none
Parameters:
  defaultMessage - String to return if the lookup fails the message



getMessage
public String getMessage(String code, List args, String defaultMessage)(Code)
Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message as a List, or null if none
Parameters:
  defaultMessage - String to return if the lookup fails the message



getMessage
public String getMessage(String code, Object[] args, String defaultMessage, boolean htmlEscape)(Code)
Retrieve the message for the given code.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message, or null if none
Parameters:
  defaultMessage - String to return if the lookup fails
Parameters:
  htmlEscape - HTML escape the message? the message



getMessage
public String getMessage(String code) throws NoSuchMessageException(Code)
Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
Parameters:
  code - code of the message the message
throws:
  org.springframework.context.NoSuchMessageException - if not found



getMessage
public String getMessage(String code, Object[] args) throws NoSuchMessageException(Code)
Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message, or null if none the message
throws:
  org.springframework.context.NoSuchMessageException - if not found



getMessage
public String getMessage(String code, List args) throws NoSuchMessageException(Code)
Retrieve the message for the given code, using the "defaultHtmlEscape" setting.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message as a List, or null if none the message
throws:
  org.springframework.context.NoSuchMessageException - if not found



getMessage
public String getMessage(String code, Object[] args, boolean htmlEscape) throws NoSuchMessageException(Code)
Retrieve the message for the given code.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message, or null if none
Parameters:
  htmlEscape - HTML escape the message? the message
throws:
  org.springframework.context.NoSuchMessageException - if not found



getMessage
public String getMessage(MessageSourceResolvable resolvable) throws NoSuchMessageException(Code)
Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance), using the "defaultHtmlEscape" setting.
Parameters:
  resolvable - the MessageSourceResolvable the message
throws:
  org.springframework.context.NoSuchMessageException - if not found



getMessage
public String getMessage(MessageSourceResolvable resolvable, boolean htmlEscape) throws NoSuchMessageException(Code)
Retrieve the given MessageSourceResolvable (e.g. an ObjectError instance).
Parameters:
  resolvable - the MessageSourceResolvable
Parameters:
  htmlEscape - HTML escape the message? the message
throws:
  org.springframework.context.NoSuchMessageException - if not found



getModelObject
protected Object getModelObject(String modelName)(Code)
Retrieve the model object for the given model name, either from the model or from the request attributes.
Parameters:
  modelName - the name of the model object the model object



getQueryString
public String getQueryString()(Code)
Return the query string of the current request, that is, the part after the request path. This is particularly useful for building an HTML form action target in combination with the original request URI.

Note this implementation will correctly resolve to the query string of any originating root request in the presence of a forwarded request. However, this can only work when the Servlet 2.4 'forward' request attributes are present. For use in a Servlet 2.3- environment, you can rely on org.springframework.web.servlet.view.InternalResourceView to add these prior to dispatching the request.

Delegates to the UrlPathHelper for decoding.
See Also:   RequestContext.getRequestUri
See Also:   org.springframework.web.util.UrlPathHelper.getOriginatingQueryString
See Also:   RequestContext.getUrlPathHelper




getRequest
final protected HttpServletRequest getRequest()(Code)
Return the underlying HttpServletRequest. Only intended for cooperating classes in this package.



getRequestUri
public String getRequestUri()(Code)
Return the request URI of the original request, that is, the invoked URL without parameters. This is particularly useful as HTML form action target, possibly in combination with the original query string.

Note this implementation will correctly resolve to the URI of any originating root request in the presence of a forwarded request. However, this can only work when the Servlet 2.4 'forward' request attributes are present. For use in a Servlet 2.3- environment, you can rely on org.springframework.web.servlet.view.InternalResourceView to add these prior to dispatching the request.

Delegates to the UrlPathHelper for decoding.
See Also:   RequestContext.getQueryString
See Also:   org.springframework.web.util.UrlPathHelper.getOriginatingRequestUri
See Also:   RequestContext.getUrlPathHelper




getServletContext
final protected ServletContext getServletContext()(Code)
Return the underlying ServletContext. Only intended for cooperating classes in this package.



getTheme
final public Theme getTheme()(Code)
Return the current theme.



getThemeMessage
public String getThemeMessage(String code, String defaultMessage)(Code)
Retrieve the theme message for the given code.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  code - code of the message
Parameters:
  defaultMessage - String to return if the lookup fails the message




getThemeMessage
public String getThemeMessage(String code, Object[] args, String defaultMessage)(Code)
Retrieve the theme message for the given code.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message, or null if none
Parameters:
  defaultMessage - String to return if the lookup fails the message




getThemeMessage
public String getThemeMessage(String code, List args, String defaultMessage)(Code)
Retrieve the theme message for the given code.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message as a List, or null if none
Parameters:
  defaultMessage - String to return if the lookup fails the message




getThemeMessage
public String getThemeMessage(String code) throws NoSuchMessageException(Code)
Retrieve the theme message for the given code.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  code - code of the message the message
throws:
  org.springframework.context.NoSuchMessageException - if not found




getThemeMessage
public String getThemeMessage(String code, Object[] args) throws NoSuchMessageException(Code)
Retrieve the theme message for the given code.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message, or null if none the message
throws:
  org.springframework.context.NoSuchMessageException - if not found




getThemeMessage
public String getThemeMessage(String code, List args) throws NoSuchMessageException(Code)
Retrieve the theme message for the given code.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  code - code of the message
Parameters:
  args - arguments for the message as a List, or null if none the message
throws:
  org.springframework.context.NoSuchMessageException - if not found




getThemeMessage
public String getThemeMessage(MessageSourceResolvable resolvable) throws NoSuchMessageException(Code)
Retrieve the given MessageSourceResolvable in the current theme.

Note that theme messages are never HTML-escaped, as they typically denote theme-specific resource paths and not client-visible messages.
Parameters:
  resolvable - the MessageSourceResolvable the message
throws:
  org.springframework.context.NoSuchMessageException - if not found




getUrlPathHelper
public UrlPathHelper getUrlPathHelper()(Code)
Return the UrlPathHelper used for context path and request URI decoding. Can be used to configure the current UrlPathHelper.

A default UrlPathHelper is always available.




getWebApplicationContext
final public WebApplicationContext getWebApplicationContext()(Code)
Return the current WebApplicationContext.



initContext
protected void initContext(HttpServletRequest request, ServletContext servletContext, Map model)(Code)
Initialize this context with the given request, using the given model attributes for Errors retrieval.

Delegates to getFallbackLocale and getFallbackTheme for determining the fallback locale and theme, respectively, if no LocaleResolver and/or ThemeResolver can be found in the request.
Parameters:
  request - current HTTP request
Parameters:
  servletContext - the servlet context of the web application(can be null; necessary for fallback to root WebApplicationContext)
Parameters:
  model - the model attributes for the current view(can be null, using the request attributes for Errors retrieval)
See Also:   RequestContext.getFallbackLocale
See Also:   RequestContext.getFallbackTheme
See Also:   org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER_ATTRIBUTE
See Also:   org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER_ATTRIBUTE




isDefaultHtmlEscape
public boolean isDefaultHtmlEscape()(Code)
Is default HTML escaping active?



setDefaultHtmlEscape
public void setDefaultHtmlEscape(boolean defaultHtmlEscape)(Code)
(De)activate default HTML escaping for messages and errors, for the scope of this RequestContext. The default is the application-wide setting (the "defaultHtmlEscape" context-param in web.xml).
See Also:   org.springframework.web.util.WebUtils.isDefaultHtmlEscape



setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)(Code)
Set the UrlPathHelper to use for context path and request URI decoding. Can be used to pass a shared UrlPathHelper instance in.

A default UrlPathHelper is always available.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.