org.thymeleaf.spring4.context
Class SpringWebContext
Object
org.thymeleaf.context.AbstractContext
org.thymeleaf.context.WebContext
org.thymeleaf.spring4.context.SpringWebContext
- All Implemented Interfaces:
- org.thymeleaf.context.IContext, org.thymeleaf.context.IWebContext
public class SpringWebContext
- extends org.thymeleaf.context.WebContext
Implementation of IContext
meant for Spring MVC applications,
extending WebContext
and adding:
- A special beans variable of class (
Beans
) that allows users to access beans
in the application context. This variable can be accessed like any other variable
in the context: ${beans.myBean.doSomething()}.
- A reference to the Application Context itself, that can be obtained and used from
element/attribute processors (
getApplicationContext()
).
- Since:
- 1.0
- Author:
- Daniel Fernández, Josh Long
Fields inherited from class org.thymeleaf.context.WebContext |
APPLICATION_VARIABLE_NAME, PARAM_VARIABLE_NAME, SESSION_VARIABLE_NAME |
Fields inherited from class org.thymeleaf.context.AbstractContext |
EXEC_INFO_VARIABLE_NAME |
Constructor Summary |
SpringWebContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,?> variables,
org.springframework.context.ApplicationContext appctx)
Creates a new instance of a SpringWebContext. |
SpringWebContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,?> variables,
org.springframework.context.ApplicationContext appctx)
Deprecated. use the constructor with an additional 'response' argument instead. Will
be removed in 2.1.x. |
Methods inherited from class org.thymeleaf.context.WebContext |
buildContextExecutionInfo, getApplicationAttributes, getHttpServletRequest, getHttpServletResponse, getHttpSession, getRequestAttributes, getRequestParameters, getServletContext, getSessionAttributes |
Methods inherited from class org.thymeleaf.context.AbstractContext |
addContextExecutionInfo, clearVariables, getLocale, getVariables, setLocale, setVariable, setVariables |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.thymeleaf.context.IContext |
addContextExecutionInfo, getLocale, getVariables |
BEANS_VARIABLE_NAME
public static final String BEANS_VARIABLE_NAME
- See Also:
- Constant Field Values
SpringWebContext
@Deprecated
public SpringWebContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,?> variables,
org.springframework.context.ApplicationContext appctx)
- Deprecated. use the constructor with an additional 'response' argument instead. Will
be removed in 2.1.x.
Creates a new instance of a SpringWebContext.
- Parameters:
request
- the request objectservletContext
- the servlet contextlocale
- the localevariables
- the variables to be included into the contextappctx
- the Spring application context
SpringWebContext
public SpringWebContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext servletContext,
Locale locale,
Map<String,?> variables,
org.springframework.context.ApplicationContext appctx)
Creates a new instance of a SpringWebContext.
- Parameters:
request
- the request objectresponse
- the response objectservletContext
- the servlet contextlocale
- the localevariables
- the variables to be included into the contextappctx
- the Spring application context
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
Copyright © 2013 The THYMELEAF team. All Rights Reserved.