| 
 | ||||||||||
| 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
public class JetspeedVelocityViewServlet
| Nested Class Summary | |
|---|---|
| private  class | JetspeedVelocityViewServlet.VelocityEngineConfigvelocity engine configuration caching object | 
| Field Summary | |
|---|---|
| private static String | CACHE_SIZE_PARAMETERdefault cache validation interval | 
| private static String | CACHE_VALIDATION_INTERVAL_PARAMETERdefault cache validation interval | 
| private  long | cacheValidationIntervalcache validation interval | 
| private  org.apache.jetspeed.locator.TemplateLocator | decorationLocatordecoration locators | 
| private static long | DEFAULT_CACHE_SIZEdefault cache size | 
| private static long | DEFAULT_CACHE_VALIDATION_INTERVALdefault cache validation interval | 
| private  org.apache.velocity.app.VelocityEngine | defaultVelocityEnginedefault velocity engine | 
| (package private)  org.apache.velocity.app.event.EventCartridge | eventCartridgeVelocity EventCartridge for handling event | 
| private static ThreadLocal | handlingRequestContextTLS for Context propagation | 
| private static org.apache.commons.logging.Log | loglogging | 
| private  Map | velocityEngineCacheVelocityEngine cache by macros locators | 
| private  Map | velocityEngineConfigCacheVelocityEngine 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, DEFAULT_PROPERTIES_PATH, DEFAULT_TOOLBOX_PATH, DEFAULT_TOOLS_PROPERTIES, INIT_PROPS_KEY, SERVLET_CONTEXT_KEY, TOOLBOX_KEY, toolboxManager | 
| Constructor Summary | |
|---|---|
| JetspeedVelocityViewServlet() | |
| Method Summary | |
|---|---|
| protected  void | error(javax.servlet.http.HttpServletRequest request,
      javax.servlet.http.HttpServletResponse response,
      Exception e) | 
| 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. | 
| protected  void | initVelocity(javax.servlet.ServletConfig config)overriding VelocityViewServlet initialization of global Velocity to properly provide our own velocity.properties so to prevent an ERROR logging for not finding the default global VM_global_library.vm (which isn't available). | 
| private  org.apache.velocity.app.VelocityEngine | initVelocity(org.apache.jetspeed.locator.TemplateDescriptor macros)Initialize new velocity instance using specified macros template. | 
| 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, findInitParameter, getResponseWriter, getVelocityEngine, getVelocityProperty, initToolbox, loadConfiguration, performMerge, requestCleanup, setContentType, setVelocityEngine | 
| 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
private org.apache.velocity.app.VelocityEngine defaultVelocityEngine
org.apache.velocity.app.event.EventCartridge eventCartridge
| Constructor Detail | 
|---|
public JetspeedVelocityViewServlet()
| Method Detail | 
|---|
public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class org.apache.velocity.tools.view.servlet.VelocityViewServletconfig - servlet configuation
javax.servlet.ServletExceptionorg.apache.velocity.tools.view.servlet.VelocityViewServlet.init()
protected void initVelocity(javax.servlet.ServletConfig config)
                     throws javax.servlet.ServletException
initVelocity in class org.apache.velocity.tools.view.servlet.VelocityViewServletjavax.servlet.ServletException
protected org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response,
                                                     org.apache.velocity.context.Context ctx)
                                              throws Exception
handleRequest in class org.apache.portals.bridges.velocity.BridgesVelocityViewServletrequest - 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
getTemplate in class org.apache.velocity.tools.view.servlet.VelocityViewServletname - 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
getTemplate in class org.apache.velocity.tools.view.servlet.VelocityViewServletname - 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()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
protected void error(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     Exception e)
              throws javax.servlet.ServletException
error in class org.apache.velocity.tools.view.servlet.VelocityViewServletjavax.servlet.ServletException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||