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
Modifier and Type | Method and Description |
---|---|
javax.servlet.http.HttpServletRequest |
getRequest()
Returns the
HttpServletRequest object associated with the template execution. |
javax.servlet.http.HttpServletResponse |
getResponse()
Returns the
HttpServletResponse object associated with the template execution. |
javax.servlet.ServletContext |
getServletContext()
Returns the
ServletContext object associated with the template execution. |
javax.servlet.http.HttpSession |
getSession()
Returns the
HttpSession object associated with the template execution, or null if
there is no session. |
containsVariable, getLocale, getVariable, getVariableNames
javax.servlet.http.HttpServletRequest getRequest()
Returns the HttpServletRequest
object associated with the template execution.
javax.servlet.http.HttpServletResponse getResponse()
Returns the HttpServletResponse
object associated with the template execution.
javax.servlet.http.HttpSession getSession()
Returns the HttpSession
object associated with the template execution, or null if
there is no session.
javax.servlet.ServletContext getServletContext()
Returns the ServletContext
object associated with the template execution.
Copyright © 2016 The THYMELEAF team. All rights reserved.