public class VelocityHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION |
static String |
REQUEST
The HTTP request object context key.
|
static String |
RESPONSE
The HTTP response object context key.
|
static String |
VELO_CONTEXT |
| Constructor and Description |
|---|
VelocityHelper() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.velocity.context.Context |
getContext(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Get the Velocity Context from the request and response.
|
static org.apache.velocity.context.Context |
getContext(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Map extraContextParams)
Get the Velocity Context from the request, response and any additional context parameters.
|
static org.apache.velocity.context.Context |
getContextWithoutInit(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Map extraContextParams)
Get the Velocity Context from the request, response and any additional context parameters.
|
static void |
initVelocity(javax.servlet.ServletContext context)
Hook up Velocity with the WebWork configuration.
|
static void |
merge(org.apache.velocity.context.Context context,
String templateName,
Writer writer) |
public static final String REQUEST
public static final String RESPONSE
public static final String ACTION
public static final String VELO_CONTEXT
public static void initVelocity(javax.servlet.ServletContext context)
throws Exception
Exceptionpublic static void merge(org.apache.velocity.context.Context context,
String templateName,
Writer writer)
public static org.apache.velocity.context.Context getContext(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
getContextWithoutInit(ServletRequest, ServletResponse, Map)
instead, and only after Velocity has been initialized.public static org.apache.velocity.context.Context getContext(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Map extraContextParams)
getContextWithoutInit(ServletRequest, ServletResponse, Map)
instead, and only after Velocity has been initialized.public static org.apache.velocity.context.Context getContextWithoutInit(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
Map extraContextParams)
Copyright © 2013 Atlassian. All Rights Reserved.