|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.velocity.tools.view.ServletUtils
public class ServletUtils
A set of utility methods for the servlet environment.
| Field Summary | |
|---|---|
static ServletUtils |
INSTANCE
|
static java.lang.String |
VELOCITY_VIEW_KEY
|
| Constructor Summary | |
|---|---|
protected |
ServletUtils()
|
| 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)
|
ServletUtils |
getInstance()
|
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.FilterConfig config)
Returns the shared VelocityView for the specified
FilterConfig's context. |
static VelocityView |
getVelocityView(JeeConfig config)
Returns the shared VelocityView for the specified
JeeConfig's context. |
static VelocityView |
getVelocityView(javax.servlet.ServletConfig config)
Returns the shared VelocityView for the specified
ServletConfig's context. |
static VelocityView |
getVelocityView(javax.servlet.ServletContext application)
Returns the shared VelocityView for the specified
ServletContext. |
static VelocityView |
getVelocityView(javax.servlet.ServletContext application,
boolean createIfMissing)
Returns the shared VelocityView for the specified
ServletContext. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VELOCITY_VIEW_KEY
public static final ServletUtils INSTANCE
| Constructor Detail |
|---|
protected ServletUtils()
| Method Detail |
|---|
public ServletUtils getInstance()
public static java.lang.String getPath(javax.servlet.http.HttpServletRequest request)
public static VelocityView getVelocityView(javax.servlet.ServletConfig config)
VelocityView for the specified
ServletConfig's context. If one has not yet been created, it
will create, store it for future access, and then return it.
public static VelocityView getVelocityView(javax.servlet.FilterConfig config)
VelocityView for the specified
FilterConfig's context. If one has not yet been created, it
will create, store it for future access, and then return it.
public static VelocityView getVelocityView(JeeConfig config)
VelocityView for the specified
JeeConfig's context. If one has not yet been created, it
will create, store it for future access, and then return it.
public static VelocityView getVelocityView(javax.servlet.ServletContext application)
VelocityView for the specified
ServletContext. If one has not yet been created,
it will create one, store it for future access, and then return it.
public static VelocityView getVelocityView(javax.servlet.ServletContext application,
boolean createIfMissing)
VelocityView for the specified
ServletContext. If one has not yet been created and
the second parameter is true, then it will
create one, store it for future access, and return it.
public static java.lang.Object findTool(java.lang.String key,
javax.servlet.ServletContext application)
public static java.lang.Object findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.ServletContext application)
public static java.lang.Object findTool(java.lang.String key,
javax.servlet.http.HttpServletRequest request)
public static java.lang.Object findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.http.HttpServletRequest request)
public static java.lang.Object findTool(java.lang.String key,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext application)
public static java.lang.Object findTool(java.lang.String key,
java.lang.String toolboxKey,
javax.servlet.http.HttpServletRequest request,
javax.servlet.ServletContext application)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||