Class ContextHolder
java.lang.Object
org.apache.tiles.velocity.template.ContextHolder
- Direct Known Subclasses:
- VelocityStyleTilesTool
An object that holds the current state of Velocity in a Servlet environment.
- Since:
- 2.2.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected jakarta.servlet.http.HttpServletRequestReturns the HTTP request.protected jakarta.servlet.http.HttpServletResponseReturns the HTTP response.protected jakarta.servlet.ServletContextReturns the Servlet context.protected org.apache.velocity.context.ContextReturns the Velocity context..voidsetRequest(jakarta.servlet.http.HttpServletRequest request) Sets the currentHttpServletRequest.voidsetResponse(jakarta.servlet.http.HttpServletResponse response) Sets the currentHttpServletResponse.voidsetServletContext(jakarta.servlet.ServletContext application) Sets theServletContext.voidsetVelocityContext(org.apache.velocity.context.Context context) Sets the VelocityContext.
- 
Constructor Details- 
ContextHolderpublic ContextHolder()
 
- 
- 
Method Details- 
setRequestpublic void setRequest(jakarta.servlet.http.HttpServletRequest request) Sets the currentHttpServletRequest. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set tonull.- Parameters:
- request- The HTTP request.
- Since:
- 2.2.0
 
- 
setResponsepublic void setResponse(jakarta.servlet.http.HttpServletResponse response) Sets the currentHttpServletResponse. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set tonull.- Parameters:
- response- The HTTP response.
- Since:
- 2.2.0
 
- 
setServletContextpublic void setServletContext(jakarta.servlet.ServletContext application) Sets theServletContext. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set tonull.- Parameters:
- application- The Servlet context.
- Since:
- 2.2.0
 
- 
setVelocityContextpublic void setVelocityContext(org.apache.velocity.context.Context context) Sets the VelocityContext. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set tonull.- Parameters:
- context- The Velocity context.
- Since:
- 2.2.0
 
- 
getRequestprotected jakarta.servlet.http.HttpServletRequest getRequest()Returns the HTTP request.- Returns:
- The HTTP request.
- Since:
- 2.2.0
 
- 
getResponseprotected jakarta.servlet.http.HttpServletResponse getResponse()Returns the HTTP response.- Returns:
- The HTTP response.
- Since:
- 2.2.0
 
- 
getServletContextprotected jakarta.servlet.ServletContext getServletContext()Returns the Servlet context.- Returns:
- The Servlet context..
- Since:
- 2.2.0
 
- 
getVelocityContextprotected org.apache.velocity.context.Context getVelocityContext()Returns the Velocity context..- Returns:
- The Velocity context.
- Since:
- 2.2.0
 
 
-