Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.velocity.template
Class ContextHolder

    java.lang.Object
      org.apache.tiles.velocity.template.ContextHolder

Direct Known Subclasses:
  VelocityStyleTilesTool

    public class ContextHolder

extends java.lang.Object

An object that holds the current state of Velocity in a Servlet environment.

Since:
  2.2.0
Version:
  $Rev: 765774 $ $Date: 2009-04-16 23:43:00 +0200 (gio, 16 apr 2009) $

Constructor Summary
`ContextHolder()`

Method Summary
`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`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContextHolder

    public ContextHolder()

Method Detail

### setRequest

    public void setRequest(javax.servlet.http.HttpServletRequest request)

  Sets the current `HttpServletRequest`. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set to `null`.

  Parameters:
    `request` - The HTTP request.
  Since:
    2.2.0

### setResponse

    public void setResponse(javax.servlet.http.HttpServletResponse response)

  Sets the current `HttpServletResponse`. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set to `null`.

  Parameters:
    `response` - The HTTP response.
  Since:
    2.2.0

### setServletContext

    public void setServletContext(javax.servlet.ServletContext application)

  Sets the `ServletContext`. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set to `null`.

  Parameters:
    `application` - The Servlet context.
  Since:
    2.2.0

### setVelocityContext

    public void setVelocityContext(org.apache.velocity.context.Context context)

  Sets the Velocity `Context`. This is required for this tool to operate and will throw a NullPointerException if this is not set or is set to `null`.

  Parameters:
    `context` - The Velocity context.
  Since:
    2.2.0

### getRequest

    protected javax.servlet.http.HttpServletRequest getRequest()

  Returns the HTTP request.

  Returns:
    The HTTP request.
  Since:
    2.2.0

### getResponse

    protected javax.servlet.http.HttpServletResponse getResponse()

  Returns the HTTP response.

  Returns:
    The HTTP response.
  Since:
    2.2.0

### getServletContext

    protected javax.servlet.ServletContext getServletContext()

  Returns the Servlet context.

  Returns:
    The Servlet context..
  Since:
    2.2.0

### getVelocityContext

    protected org.apache.velocity.context.Context getVelocityContext()

  Returns the Velocity context..

  Returns:
    The Velocity context.
  Since:
    2.2.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.