|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.velocity.tools.view.servlet.VelocityViewServlet
org.apache.portals.bridges.velocity.BridgesVelocityViewServlet
org.apache.jetspeed.velocity.JetspeedVelocityViewServlet
| Nested Class Summary | |
private class |
JetspeedVelocityViewServlet.VelocityEngineConfig
velocity engine configuration caching object |
private static class |
JetspeedVelocityViewServlet.VelocityEngineLogger
velocity engine logging adapter |
| Field Summary | |
private static String |
CACHE_SIZE_PARAMETER
default cache validation interval |
private static String |
CACHE_VALIDATION_INTERVAL_PARAMETER
default cache validation interval |
private long |
cacheValidationInterval
cache validation interval |
private org.apache.jetspeed.locator.TemplateLocator |
decorationLocator
decoration locators |
private static long |
DEFAULT_CACHE_SIZE
default cache size |
private static long |
DEFAULT_CACHE_VALIDATION_INTERVAL
default cache validation interval |
private static ThreadLocal |
handlingRequestContext
TLS for Context propagation |
private static org.apache.commons.logging.Log |
log
logging |
private Map |
velocityEngineCache
VelocityEngine cache by macros locators |
private Map |
velocityEngineConfigCache
VelocityEngine configuration cache by decoration |
| Fields inherited from class org.apache.portals.bridges.velocity.BridgesVelocityViewServlet |
PORTLET_CONFIG, PORTLET_REQUEST, PORTLET_RESPONSE, VELOCITY_CONTEXT_ATTR, VELOCITY_WRITER_ATTR |
| Fields inherited from class org.apache.velocity.tools.view.servlet.VelocityViewServlet |
CONTENT_TYPE, DEFAULT_CONTENT_TYPE, DEFAULT_OUTPUT_ENCODING, INIT_PROPS_KEY, SERVLET_CONTEXT_KEY, TOOLBOX_KEY, toolboxManager |
| Fields inherited from class javax.servlet.http.HttpServlet |
|
| Fields inherited from class javax.servlet.GenericServlet |
|
| Constructor Summary | |
JetspeedVelocityViewServlet()
|
|
| Method Summary | |
private long |
getLongInitParameter(javax.servlet.ServletConfig config,
String name,
long defaultValue)
Utility to get long init parameters. |
org.apache.velocity.Template |
getTemplate(String name)
Retrieves the requested template. |
org.apache.velocity.Template |
getTemplate(String name,
String encoding)
Retrieves the requested template with the specified character encoding. |
private org.apache.velocity.app.VelocityEngine |
getVelocityEngine(org.apache.velocity.context.Context ctx)
Get VelocityEngine for template access. |
protected org.apache.velocity.Template |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.velocity.context.Context ctx)
Handle the template processing request. |
void |
init(javax.servlet.ServletConfig config)
Initialize servlet, BridgesVelocityViewServlet, and VelocityViewServlet. |
private org.apache.velocity.app.VelocityEngine |
initVelocity(org.apache.jetspeed.locator.TemplateDescriptor macros)
Initialize new velocity instance using specified macros template. |
protected org.apache.commons.collections.ExtendedProperties |
loadConfiguration(javax.servlet.ServletConfig config)
Loads Velocity configuration information and returns that information as an ExtendedProperties, which will be used to initialize the Velocity runtime. |
| Methods inherited from class org.apache.portals.bridges.velocity.BridgesVelocityViewServlet |
mergeTemplate |
| Methods inherited from class org.apache.velocity.tools.view.servlet.VelocityViewServlet |
createContext, doGet, doPost, doRequest, error, getResponseWriter, initToolbox, initVelocity, requestCleanup, setContentType |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final org.apache.commons.logging.Log log
private static final long DEFAULT_CACHE_SIZE
private static final String CACHE_SIZE_PARAMETER
private static final long DEFAULT_CACHE_VALIDATION_INTERVAL
private static final String CACHE_VALIDATION_INTERVAL_PARAMETER
private static ThreadLocal handlingRequestContext
private org.apache.jetspeed.locator.TemplateLocator decorationLocator
private Map velocityEngineConfigCache
private Map velocityEngineCache
private long cacheValidationInterval
| Constructor Detail |
public JetspeedVelocityViewServlet()
| Method Detail |
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
config - servlet configuation
javax.servlet.ServletExceptionorg.apache.velocity.tools.view.servlet.VelocityViewServlet.init()
protected org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.velocity.context.Context ctx)
throws Exception
request - client requestresponse - client responsectx - VelocityContext to fill
Exceptionorg.apache.velocity.tools.view.servlet.VelocityViewServlet.handleRequest()
public org.apache.velocity.Template getTemplate(String name)
throws org.apache.velocity.exception.ResourceNotFoundException,
org.apache.velocity.exception.ParseErrorException,
Exception
name - The file name of the template to retrieve relative to the template root.
org.apache.velocity.exception.ResourceNotFoundException - if template not found from any available source.
org.apache.velocity.exception.ParseErrorException - if template cannot be parsed due to syntax (or other) error.
Exception - if an error occurs in template initializationorg.apache.velocity.tools.view.servlet.VelocityViewServlet.getTemplate()
public org.apache.velocity.Template getTemplate(String name,
String encoding)
throws org.apache.velocity.exception.ResourceNotFoundException,
org.apache.velocity.exception.ParseErrorException,
Exception
name - The file name of the template to retrieve relative to the template root.encoding - the character encoding of the template
org.apache.velocity.exception.ResourceNotFoundException - if template not found from any available source.
org.apache.velocity.exception.ParseErrorException - if template cannot be parsed due to syntax (or other) error.
Exception - if an error occurs in template initializationorg.apache.velocity.tools.view.servlet.VelocityViewServlet.getTemplate()
protected org.apache.commons.collections.ExtendedProperties loadConfiguration(javax.servlet.ServletConfig config)
throws IOException
config - ServletConfig passed to the servlets init() function.
IOException - I/O problem accessing the specified file, if specified.org.apache.velocity.tools.view.servlet.VelocityViewServlet.loadConfiguration()private org.apache.velocity.app.VelocityEngine getVelocityEngine(org.apache.velocity.context.Context ctx)
ctx - the velocity context.
private org.apache.velocity.app.VelocityEngine initVelocity(org.apache.jetspeed.locator.TemplateDescriptor macros)
macros - template descriptor.
org.apache.velocity.tools.view.servlet.VelocityViewServlet.initVelocity()
private long getLongInitParameter(javax.servlet.ServletConfig config,
String name,
long defaultValue)
config - servlet configname - of init parameterdefaultValue - value
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||