| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.apache.catalina.servlets.ManagerServlet
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:
 
/xxx, based
     on the contents of the web application archive found at the
     specified URL.path:status:sessions.
     Where path is the context path.  Status is either running or stopped.
     Sessions is the number of active Sessions./xxx for this virtual host./xxx for this
     virtual host./xxx for this virtual host./xxx for this virtual host.Use path=/ for the ROOT context.
The syntax of the URL for a web application archive must conform to one of the following patterns to be successfully deployed:
JarURLConnection class for a
     reference to an entire JAR file.JarURLConnection class for a reference to an entire
     JAR file.NOTE - Attempting to reload or remove 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:
| Field Summary | |
| protected  Context | contextThe Context container associated with our web application. | 
| protected  int | debugThe debugging detail level for this servlet. | 
| protected  Deployer | deployerThe Deployer container that contains our own web application's Context, along with the associated Contexts for web applications that we are managing. | 
| protected static StringManager | smThe string manager for this package. | 
| protected  Wrapper | wrapperThe Wrapper container associated with this servlet. | 
| Constructor Summary | |
| ManagerServlet() | |
| 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. | 
|  Wrapper | getWrapper()Return the Wrapper with which we are associated. | 
|  void | init()Initialize this servlet. | 
| protected  void | install(java.io.PrintWriter writer,
        java.lang.String path,
        java.lang.String war)Install an application for the specified path from the specified web application archive. | 
| protected  void | list(java.io.PrintWriter writer)Render a list of the currently active Contexts in our virtual host. | 
| protected  void | reload(java.io.PrintWriter writer,
       java.lang.String path)Reload the web application at the specified context path. | 
| protected  void | remove(java.io.PrintWriter writer,
       java.lang.String path)Remove the web application at the specified context path. | 
| protected  void | sessions(java.io.PrintWriter writer,
         java.lang.String path)Session information for the web application at the specified context path. | 
|  void | setWrapper(Wrapper wrapper)Set the Wrapper with which we are associated. | 
| protected  void | start(java.io.PrintWriter writer,
      java.lang.String path)Start the web application at the specified context path. | 
| protected  void | stop(java.io.PrintWriter writer,
     java.lang.String path)Stop the web application at the specified context path. | 
| 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 | 
| Field Detail | 
protected Context context
protected int debug
protected Deployer deployer
protected static StringManager sm
protected Wrapper wrapper
| Constructor Detail | 
public ManagerServlet()
| Method Detail | 
public Wrapper getWrapper()
getWrapper in interface ContainerServletpublic void setWrapper(Wrapper wrapper)
setWrapper in interface ContainerServletwrapper - The new wrapperpublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServlet
public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
doGet in class javax.servlet.http.HttpServletrequest - The servlet request we are processingresponse - The servlet response we are creating
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet-specified error occurs
public void init()
          throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletException
protected void install(java.io.PrintWriter writer,
                       java.lang.String path,
                       java.lang.String war)
writer - Writer to render results topath - Context path of the application to be installedwar - URL of the web application archive to be installedprotected void list(java.io.PrintWriter writer)
writer - Writer to render to
protected void reload(java.io.PrintWriter writer,
                      java.lang.String path)
writer - Writer to render topath - Context path of the application to be restarted
protected void remove(java.io.PrintWriter writer,
                      java.lang.String path)
writer - Writer to render topath - Context path of the application to be removed
protected void sessions(java.io.PrintWriter writer,
                        java.lang.String path)
writer - Writer to render topath - Context path of the application to list session information for
protected void start(java.io.PrintWriter writer,
                     java.lang.String path)
writer - Writer to render topath - Context path of the application to be started
protected void stop(java.io.PrintWriter writer,
                    java.lang.String path)
writer - Writer to render topath - Context path of the application to be stopped| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||