public class ContextHolder extends Object
Constructor and Description |
---|
ContextHolder() |
Modifier and Type | Method and Description |
---|---|
protected javax.servlet.http.HttpServletRequest |
getRequest()
Returns the HTTP request.
|
protected javax.servlet.http.HttpServletResponse |
getResponse()
Returns the HTTP response.
|
protected javax.servlet.ServletContext |
getServletContext()
Returns the Servlet context.
|
protected org.apache.velocity.context.Context |
getVelocityContext()
Returns the Velocity context..
|
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Sets the current
HttpServletRequest . |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
Sets the current
HttpServletResponse . |
void |
setServletContext(javax.servlet.ServletContext application)
Sets the
ServletContext . |
void |
setVelocityContext(org.apache.velocity.context.Context context)
Sets the Velocity
Context . |
public void setRequest(javax.servlet.http.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(javax.servlet.http.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(javax.servlet.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(org.apache.velocity.context.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 javax.servlet.http.HttpServletRequest getRequest()
protected javax.servlet.http.HttpServletResponse getResponse()
protected javax.servlet.ServletContext getServletContext()
protected org.apache.velocity.context.Context getVelocityContext()
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.