webwork.view.velocity
Class WebWorkVelocityServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.apache.velocity.servlet.VelocityServlet
              extended bywebwork.view.velocity.WebWorkVelocityServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

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

Velocity integration servlet. Transfer action properties to Velocity context and use WebWork configuration to supply Velocity with settings. This allows you to use Velocity templates as views of WebWork actions.

Version:
$Revision: 1.6 $
Author:
Rickard Öberg (rickard@dreambean.com)
See Also:
Serialized Form

Field Summary
protected  org.apache.commons.logging.Log log
           
 
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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create a context that delegates to the standard context and also allows Velocity to access properties from the ValueStack.
protected  org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse, org.apache.velocity.context.Context ctx)
          Get the template to show.
 void init()
           
 void service(javax.servlet.ServletRequest aRequest, javax.servlet.ServletResponse aResponse)
           
 
Methods inherited from class org.apache.velocity.servlet.VelocityServlet
chooseCharacterEncoding, doGet, doPost, doRequest, error, getTemplate, getTemplate, handleRequest, init, initVelocity, loadConfiguration, mergeTemplate, requestCleanup, setContentType
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
Constructor Detail

WebWorkVelocityServlet

public WebWorkVelocityServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

service

public void service(javax.servlet.ServletRequest aRequest,
                    javax.servlet.ServletResponse aResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

createContext

protected org.apache.velocity.context.Context createContext(javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
Create a context that delegates to the standard context and also allows Velocity to access properties from the ValueStack.


handleRequest

protected org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest aRequest,
                                                     javax.servlet.http.HttpServletResponse aResponse,
                                                     org.apache.velocity.context.Context ctx)
                                              throws java.lang.Exception
Get the template to show.

Throws:
java.lang.Exception


Copyright © 2001-2003 WebWork All Rights Reserved.