org.apache.jcs.admin.servlet
Class JCSAdminServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.velocity.servlet.VelocityServlet
org.apache.jcs.admin.servlet.JCSAdminServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class JCSAdminServlet
- extends org.apache.velocity.servlet.VelocityServlet
A servlet which provides HTTP access to JCS. Allows a summary of regions to
be viewed, and removeAll to be run on individual regions or all regions. Also
provides the ability to remove items (any number of key arguments can be
provided with action 'remove'). Should be initialized with a properties file
that provides at least a classpath resource loader. Since this extends
VelocityServlet, which uses the singleton model for velocity, it will share
configuration with any other Velocity in the same JVM.
Initialization in a webapp will look something like this:
[servlet]
[servlet-name]JCSAdminServlet[/servlet-name]
[servlet-class]org.apache.jcs.admin.servlet.JCSAdminServlet[/servlet-class]
[init-param]
[param-name]properties[/param-name]
[param-value]WEB-INF/conf/JCSAdminServlet.velocity.properties[/param-value]
[/init-param]
[/servlet]
FIXME: It would be nice to use the VelocityEngine model so this can be truly
standalone. Right now if you run it in the same container as, say, turbine,
turbine must be run first to ensure it's config takes precedence.
- Version:
- $Id: JCSAdminServlet.java 374736 2006-02-03 20:11:22Z asmuts $
- 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 |
Method Summary |
protected org.apache.velocity.Template |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.velocity.context.Context context)
|
Methods inherited from class org.apache.velocity.servlet.VelocityServlet |
chooseCharacterEncoding, createContext, 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, 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 |
JCSAdminServlet
public JCSAdminServlet()
handleRequest
protected org.apache.velocity.Template handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.velocity.context.Context context)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.