Interface IWebContext
-
- All Superinterfaces:
IContext
- All Known Implementing Classes:
WebContext,WebEngineContext,WebExpressionContext
public interface IWebContext extends IContext
Specialization of the
IContextinterface to be implemented by contexts used for template processing in web environments.Objects implementing this interface add to the usual
IContextdata the Servlet-API-related artifacts needed to perform web-oriented functions such as URL rewriting or request/session access.Note a class with this name existed since 1.0, but it was completely reimplemented in Thymeleaf 3.0
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.servlet.http.HttpServletRequestgetRequest()Returns theHttpServletRequestobject associated with the template execution.javax.servlet.http.HttpServletResponsegetResponse()Returns theHttpServletResponseobject associated with the template execution.javax.servlet.ServletContextgetServletContext()Returns theServletContextobject associated with the template execution.javax.servlet.http.HttpSessiongetSession()Returns theHttpSessionobject associated with the template execution, or null if there is no session.-
Methods inherited from interface org.thymeleaf.context.IContext
containsVariable, getLocale, getVariable, getVariableNames
-
-
-
-
Method Detail
-
getRequest
javax.servlet.http.HttpServletRequest getRequest()
Returns the
HttpServletRequestobject associated with the template execution.- Returns:
- the request object.
-
getResponse
javax.servlet.http.HttpServletResponse getResponse()
Returns the
HttpServletResponseobject associated with the template execution.- Returns:
- the response object.
-
getSession
javax.servlet.http.HttpSession getSession()
Returns the
HttpSessionobject associated with the template execution, or null if there is no session.- Returns:
- the session object. Might be null if no session has been created.
-
getServletContext
javax.servlet.ServletContext getServletContext()
Returns the
ServletContextobject associated with the template execution.- Returns:
- the servlet context object.
-
-