com.opensymphony.webwork.views.velocity
Class WebWorkVelocityServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.apache.velocity.servlet.VelocityServlet
              extended bycom.opensymphony.webwork.views.velocity.WebWorkVelocityServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class WebWorkVelocityServlet
extends org.apache.velocity.servlet.VelocityServlet

Version:
$Revision: 1.15 $
Author:
$Author: plightbo $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.velocity.servlet.VelocityServlet
CONTENT_TYPE, DEFAULT_CONTENT_TYPE, DEFAULT_OUTPUT_ENCODING, INIT_PROPS_KEY, REQUEST, RESPONSE
 
Constructor Summary
WebWorkVelocityServlet()
           
 
Method Summary
protected  org.apache.velocity.context.Context createContext(HttpServletRequest request, HttpServletResponse response)
           
protected  org.apache.velocity.Template handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, org.apache.velocity.context.Context context)
           
 void init(ServletConfig servletConfig)
           
protected  Properties loadConfiguration(ServletConfig servletConfig)
          This method extends the VelocityServlet's loadConfiguration method by performing the following actions: invokes VelocityServlet.loadConfiguration to create a properties object alters the RESOURCE_LOADER to include a class loader configures the class loader using the WebWorkResourceLoader
protected  void mergeTemplate(org.apache.velocity.Template template, org.apache.velocity.context.Context context, HttpServletResponse response)
          create a PageContext and render the template to PageContext.getOut()
 
Methods inherited from class org.apache.velocity.servlet.VelocityServlet
chooseCharacterEncoding, doGet, doPost, doRequest, error, getTemplate, getTemplate, handleRequest, 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
 

Constructor Detail

WebWorkVelocityServlet

public WebWorkVelocityServlet()
Method Detail

init

public void init(ServletConfig servletConfig)
          throws ServletException
Throws:
ServletException

createContext

protected org.apache.velocity.context.Context createContext(HttpServletRequest request,
                                                            HttpServletResponse response)

handleRequest

protected org.apache.velocity.Template handleRequest(HttpServletRequest httpServletRequest,
                                                     HttpServletResponse httpServletResponse,
                                                     org.apache.velocity.context.Context context)
                                              throws Exception
Throws:
Exception

loadConfiguration

protected Properties loadConfiguration(ServletConfig servletConfig)
                                throws IOException,
                                       FileNotFoundException
This method extends the VelocityServlet's loadConfiguration method by performing the following actions:

Parameters:
servletConfig -
Throws:
IOException
FileNotFoundException
See Also:
VelocityServlet.loadConfiguration(javax.servlet.ServletConfig)

mergeTemplate

protected void mergeTemplate(org.apache.velocity.Template template,
                             org.apache.velocity.context.Context context,
                             HttpServletResponse response)
                      throws org.apache.velocity.exception.ResourceNotFoundException,
                             org.apache.velocity.exception.ParseErrorException,
                             org.apache.velocity.exception.MethodInvocationException,
                             IOException,
                             UnsupportedEncodingException,
                             Exception
create a PageContext and render the template to PageContext.getOut()

Throws:
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
org.apache.velocity.exception.MethodInvocationException
IOException
UnsupportedEncodingException
Exception
See Also:
for additional documentation

WebWork Project Page