com.opensymphony.webwork.views.velocity
Class WebWorkVelocityServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.velocity.servlet.VelocityServlet
com.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
Fields inherited from class org.apache.velocity.servlet.VelocityServlet |
CONTENT_TYPE, DEFAULT_CONTENT_TYPE, DEFAULT_OUTPUT_ENCODING, INIT_PROPS_KEY, REQUEST, RESPONSE |
Methods inherited from class org.apache.velocity.servlet.VelocityServlet |
chooseCharacterEncoding, doGet, doPost, doRequest, error, getTemplate, getTemplate, handleRequest, initVelocity, requestCleanup, setContentType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebWorkVelocityServlet
public WebWorkVelocityServlet()
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:
- invokes VelocityServlet.loadConfiguration to create a properties object
- alters the RESOURCE_LOADER to include a class loader
- configures the class loader using the WebWorkResourceLoader
- 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