public class ContextHolder
extends java.lang.Object
Constructor and Description |
---|
ContextHolder() |
Modifier and Type | Method and Description |
---|---|
protected HttpServletRequest |
getRequest()
Returns the HTTP request.
|
protected HttpServletResponse |
getResponse()
Returns the HTTP response.
|
protected ServletContext |
getServletContext()
Returns the Servlet context.
|
protected Context |
getVelocityContext()
Returns the Velocity context..
|
void |
setRequest(HttpServletRequest request)
Sets the current
HttpServletRequest . |
void |
setResponse(HttpServletResponse response)
Sets the current
HttpServletResponse . |
void |
setServletContext(ServletContext application)
Sets the
ServletContext . |
void |
setVelocityContext(Context context)
Sets the Velocity
Context . |
public void setRequest(HttpServletRequest request)
HttpServletRequest
. This is required for this
tool to operate and will throw a NullPointerException if this is not set
or is set to null
.request
- The HTTP request.public void setResponse(HttpServletResponse response)
HttpServletResponse
. This is required for this
tool to operate and will throw a NullPointerException if this is not set
or is set to null
.response
- The HTTP response.public void setServletContext(ServletContext application)
ServletContext
. This is required for this tool to
operate and will throw a NullPointerException if this is not set or is
set to null
.application
- The Servlet context.public void setVelocityContext(Context context)
Context
. This is required for this tool to
operate and will throw a NullPointerException if this is not set or is
set to null
.context
- The Velocity context.protected HttpServletRequest getRequest()
protected HttpServletResponse getResponse()
protected ServletContext getServletContext()
protected Context getVelocityContext()