org.apache.velocity.tools.view
Class ServletUtils
java.lang.Object
org.apache.velocity.tools.view.ServletUtils
- Direct Known Subclasses:
- ServletUtils
public class ServletUtils
- extends java.lang.Object
A set of utility methods for the servlet environment.
- Version:
- $Id: ServletUtils.java 471244 2006-11-04 18:34:38Z henning $
Method Summary |
static java.lang.Object |
findTool(java.lang.String key,
javax.servlet.http.HttpServletRequest request)
|
static java.lang.Object |
findTool(java.lang.String key,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext application)
|
static java.lang.Object |
findTool(java.lang.String key,
javax.servlet.ServletContext application)
|
static java.lang.Object |
findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.http.HttpServletRequest request)
|
static java.lang.Object |
findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext application)
|
static java.lang.Object |
findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.ServletContext application)
|
static java.lang.String |
getPath(javax.servlet.http.HttpServletRequest request)
Retrieves the path for the specified request regardless of
whether this is a direct request or an include by the
RequestDispatcher. |
static VelocityView |
getVelocityView(javax.servlet.ServletConfig config)
Returns the shared VelocityView for the specified
ServletConfig . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VELOCITY_VIEW_KEY
public static final java.lang.String VELOCITY_VIEW_KEY
ServletUtils
public ServletUtils()
getPath
public static java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
- Retrieves the path for the specified request regardless of
whether this is a direct request or an include by the
RequestDispatcher.
getVelocityView
public static VelocityView getVelocityView(javax.servlet.ServletConfig config)
- Returns the shared
VelocityView
for the specified
ServletConfig
. If one has not yet been created, it
will create, store it for future access, and then return it.
findTool
public static java.lang.Object findTool(java.lang.String key,
javax.servlet.ServletContext application)
findTool
public static java.lang.Object findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.ServletContext application)
findTool
public static java.lang.Object findTool(java.lang.String key,
javax.servlet.http.HttpServletRequest request)
findTool
public static java.lang.Object findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.http.HttpServletRequest request)
findTool
public static java.lang.Object findTool(java.lang.String key,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext application)
findTool
public static java.lang.Object findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext application)
Copyright (c) 2003-2007 Apache Software Foundation