public abstract class VmServlet extends ComponentServlet
VmServlet is a Servlet that makes use of the Velocity Template Engine.
This extends our ComponentServlet, giving us also the ability to find registered service components.
ATTR_PARAMS| Constructor and Description |
|---|
VmServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected ActionURL |
getActionURL(HttpServletRequest request)
Get a new ActionURL.
|
Object |
getVmReference(String name,
HttpServletRequest request)
Access the object set in the velocity context for this name, if any.
|
protected void |
includeVm(String template,
HttpServletRequest request,
HttpServletResponse response)
Include the Velocity template, expanded with the current set of references
|
void |
setVmReference(String name,
Object value,
HttpServletRequest request)
Add a reference object to the velocity context by name - if it's not already defined
|
protected void |
setVmStdRef(HttpServletRequest request,
HttpServletResponse response)
Add some standard references to the vm context.
|
sendParentRedirect, service, setNoCacheHeadersdoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logpublic Object getVmReference(String name, HttpServletRequest request)
name - The reference name.request - The request.public void setVmReference(String name, Object value, HttpServletRequest request)
name - The reference name.value - The reference value object.request - The request.protected void setVmStdRef(HttpServletRequest request, HttpServletResponse response)
request - The request.response - The response.protected void includeVm(String template, HttpServletRequest request, HttpServletResponse response) throws ServletException
template - The path, relative to the webapp context, of the template filerequest - The render request.response - The render response.PortletException - if something goes wrong.ServletExceptionprotected ActionURL getActionURL(HttpServletRequest request)
req - The current request.Copyright © 2003–2017 The Sakai Foundation. All rights reserved.