org.apache.catalina.servlets
Class ManagerServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--org.apache.catalina.servlets.ManagerServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public final class ManagerServlet
- extends javax.servlet.http.HttpServlet
Servlet that enables remote management of the web applications installed
within the same virtual host as this web application is. Normally, this
functionality will be protected by a security constraint in the web
application deployment descriptor. However, this requirement can be
relaxed during testing.
This servlet examines the value returned by getPathInfo()
and related query parameters to determine what action is being requested.
The following actions and parameters (starting after the servlet path)
are supported:
- /list - Return a list of the context paths of all currently
running web applications in this virtual host.
- /deploy?path=/xxx&war={war-url} - Deploy a new web application
attached to context path
/xxx
, based on the contents of
the web application archive found at the specified URL.
- /reload?path=/xxx - Reload the Java classes and resources for
the application at the specified path, but do not reread the web.xml
configuration files.
- /undeploy?path=/xxx - Remove any web application attached to
context path
/xxx
from this virtual host.
NOTE - Attempting to reload or undeploy the application containing
this servlet itself will not succeed. Therefore, this servlet should
generally be deployed as a separate web application within the virtual host
to be managed.
NOTE - For security reasons, this application will not operate
when accessed via the invoker servlet. You must explicitly map this servlet
with a servlet mapping, and you will always want to protect it with
appropriate security constraints as well.
The following servlet initialization parameters are recognized:
- debug - The debugging detail level that controls the amount
of information that is logged by this servlet. Default is zero.
- Version:
- $Revision: 1.2 $ $Date: 2000/10/05 02:30:22 $
- Author:
- Craig R. McClanahan
- See Also:
- Serialized Form
Method Summary |
void |
destroy()
Finalize this servlet. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Process a GET request for the specified resource. |
void |
init()
Initialize this servlet. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
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 |
ManagerServlet
public ManagerServlet()
destroy
public void destroy()
- Finalize this servlet.
- Overrides:
destroy
in class javax.servlet.GenericServlet
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Process a GET request for the specified resource.
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
request
- The servlet request we are processingresponse
- The servlet response we are creating- Throws:
java.io.IOException
- if an input/output error occursjavax.servlet.ServletException
- if a servlet-specified error occurs
init
public void init()
throws javax.servlet.ServletException
- Initialize this servlet.
- Overrides:
init
in class javax.servlet.GenericServlet
Copyright © 2000 Apache Software Foundation. All Rights Reserved.