Interface IWebContext
-
- All Superinterfaces:
IContext
- All Known Implementing Classes:
WebContext
,WebEngineContext
,WebExpressionContext
public interface IWebContext extends IContext
Specialization of the
IContext
interface to be implemented by contexts used for template processing in web environments.Objects implementing this interface add to the usual
IContext
data 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.HttpServletRequest
getRequest()
Returns theHttpServletRequest
object associated with the template execution.javax.servlet.http.HttpServletResponse
getResponse()
Returns theHttpServletResponse
object associated with the template execution.javax.servlet.ServletContext
getServletContext()
Returns theServletContext
object associated with the template execution.javax.servlet.http.HttpSession
getSession()
Returns theHttpSession
object 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
HttpServletRequest
object associated with the template execution.- Returns:
- the request object.
-
getResponse
javax.servlet.http.HttpServletResponse getResponse()
Returns the
HttpServletResponse
object associated with the template execution.- Returns:
- the response object.
-
getSession
javax.servlet.http.HttpSession getSession()
Returns the
HttpSession
object 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
ServletContext
object associated with the template execution.- Returns:
- the servlet context object.
-
-