org.thymeleaf.spring3.context
Class SpringWebContext
Object
org.thymeleaf.context.AbstractContext
org.thymeleaf.context.WebContext
org.thymeleaf.spring3.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.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. |
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
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.