org.thymeleaf.context
Interface IWebContext

All Superinterfaces:
IContext
All Known Implementing Classes:
WebContext

public interface IWebContext
extends IContext

Subinterface of IContext for implementations that can be used for creating HTML/XHTML interfaces in web applications.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 VariablesMap<String,Object> getApplicationAttributes()
           Returns a VariablesMap object with all the attributes associated with the ServletContext object linked to the HttpServletRequest used for creating the context.
 String getContextPath()
           Returns the context path associated with the web application.
 VariablesMap<String,Object> getRequestAttributes()
           Returns a VariablesMap object with all the attributes associated with the HttpServletRequest used for creating the context.
 VariablesMap<String,String[]> getRequestParameters()
           Returns a VariablesMap object with all the parameters associated with the HttpServletRequest used for creating the context.
 javax.servlet.ServletContext getServletContext()
           Returns the ServletContext object associated with the web application.
 VariablesMap<String,Object> getSessionAttributes()
           Returns a VariablesMap object with all the attributes associated with the HttpSession object linked to the HttpServletRequest used for creating the context.
 String getSessionID()
           Returns the session ID associated with the current execution of the template engine.
 boolean isSessionIdFromCookie()
           Returns whether the session ID is currently being kept by using cookies or an URL fragment.
 
Methods inherited from interface org.thymeleaf.context.IContext
addContextExecutionInfo, getLocale, getVariables
 

Method Detail

getServletContext

javax.servlet.ServletContext getServletContext()

Returns the ServletContext object associated with the web application.

Returns:
the servlet context.

getContextPath

String getContextPath()

Returns the context path associated with the web application.

Returns:
the context path of the web application.

getSessionID

String getSessionID()

Returns the session ID associated with the current execution of the template engine. This ID corresponds with the jsessionid URL fragment or cookie from the HTTP request.

Returns:
the session ID.

isSessionIdFromCookie

boolean isSessionIdFromCookie()

Returns whether the session ID is currently being kept by using cookies or an URL fragment.

Returns:
true if a JSESSIONID cookie is being used, false if a ";jsessionid=..." URL fragment is being used.

getRequestParameters

VariablesMap<String,String[]> getRequestParameters()

Returns a VariablesMap object with all the parameters associated with the HttpServletRequest used for creating the context.

Returns:
the maps of request parameters.

getRequestAttributes

VariablesMap<String,Object> getRequestAttributes()

Returns a VariablesMap object with all the attributes associated with the HttpServletRequest used for creating the context.

Returns:
the maps of request attributes.

getSessionAttributes

VariablesMap<String,Object> getSessionAttributes()

Returns a VariablesMap object with all the attributes associated with the HttpSession object linked to the HttpServletRequest used for creating the context.

Returns:
the maps of session attributes.

getApplicationAttributes

VariablesMap<String,Object> getApplicationAttributes()

Returns a VariablesMap object with all the attributes associated with the ServletContext object linked to the HttpServletRequest used for creating the context.

Returns:
the maps of application attributes.


Copyright © 2011 The THYMELEAF team. All Rights Reserved.