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:
docBase attribute of the context
configuration file is used to locate the actual WAR or directory containing the application.{config-url}, overriding the docBase
attribute with the contents of the web application archive found at {war-url}./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 which were idle for
at least mm minutes./xxx for this virtual
host./xxx for this virtual
host./xxx
for this virtual host, and remove the underlying WAR file or document base directory. (NOTE - This is only
allowed if the WAR file or document base is stored in the appBase directory of this host, typically as a
result of being placed there via the /deploy command./xxx to an appropriately named context.xml file in the xmlBase for the associated
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:
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.
The following servlet initialization parameters are recognized:
| Modifier and Type | Field and Description |
|---|---|
| protected File | configBase
Path where context descriptors should be deployed. |
| protected transient Context | context
The Context container associated with our web application. |
| protected int | debug
The debugging detail level for this servlet. |
| protected transient Context | global
The global JNDI |
| protected transient Host | host
The associated host. |
| protected transient MBeanServer | mBeanServer
MBean server. |
| protected ObjectName | oname
The associated deployer ObjectName. |
| private static final long | |
| protected static final StringManager | sm
The string manager for this package. |
| protected File | versioned
Path used to store revisions of webapps. |
| protected transient Wrapper | wrapper
The Wrapper container associated with this servlet. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | deploy(PrintWriter
Writer to render results to writer, String URL of the context configuration file to be installed config, ContextName Name of the application to be installed cn, String Tag to be associated with the webapp tag, boolean Flag that indicates that any existing app should be replaced update, HttpServletRequest Servlet request we are processing request, StringManager i18n messages using the locale of the client smClient)Deploy a web application archive (included in the current request) at the specified context path. |
| protected void | deploy(PrintWriter
Writer to render results to writer, ContextName Name of the application to be installed cn, String Revision tag to deploy from tag, StringManager i18n messages using the locale of the client smClient)Install an application for the specified path from the specified web application archive. |
| protected void | deploy(PrintWriter
Writer to render results to writer, String URL of the context configuration file to be installed config, ContextName Name of the application to be installed cn, String URL of the web application archive to be installed war, boolean true to override any existing webapp on the path update, StringManager i18n messages using the locale of the client smClient)Install an application for the specified path from the specified web application archive. |
| public void | destroy()
Overrides jakarta. Implements jakarta. Finalize this servlet. |
| public void | doGet(HttpServletRequest
The servlet request we are processing request, HttpServletResponse The servlet response we are creating response)Overrides jakarta. Process a GET request for the specified resource. |
| public void | doPut(HttpServletRequest
The servlet request we are processing request, HttpServletResponse The servlet response we are creating response)Overrides jakarta. Process a PUT request for the specified resource. |
| protected void | expireSessions(PrintWriter
Writer to render to writer, ContextName Name of the application to list session information for cn, HttpServletRequest The Servlet request req, StringManager i18n support for current client's locale smClient)Extract the expiration request parameter |
| protected void | findleaks(boolean
Print a status line statusLine, PrintWriter The output writer writer, StringManager StringManager for the client's locale smClient)Find potential memory leaks caused by web application reload. |
| protected Map | |
| protected Map | |
| private Connector[] | |
| protected Map | |
| public Wrapper | getWrapper()
Implements org. Return the Wrapper with which we are associated. |
| public void | |
| protected boolean | Returns: true if a webapp with that name is deployedThe webapp name name)Invoke the isDeployed method on the deployer. |
| protected void | list(PrintWriter
Writer to render to writer, StringManager i18n support for current client's locale smClient)Render a list of the currently active Contexts in our virtual host. |
| protected void | printResources(PrintWriter
Writer to render to writer, String Path for recursion prefix, Context The naming context for lookups namingContext, String Fully qualified class name of the resource type of interest, or type, StringManager null to list
resources of all typesi18n support for current client's locale smClient)List the resources of the given context. |
| protected void | reload(PrintWriter
Writer to render to writer, ContextName Name of the application to be restarted cn, StringManager i18n support for current client's locale smClient)Reload the web application at the specified context path. |
| protected void | |
| protected void | resources(PrintWriter
Writer to render to writer, String Fully qualified class name of the resource type of interest, or type, StringManager null to list
resources of all typesi18n support for current client's locale smClient)Render a list of available global JNDI resources. |
| protected synchronized void | save(PrintWriter
Destination for any user message(s) during this operation writer, String Optional context path to save path, StringManager i18n support for current client's locale smClient)Store server configuration. |
| protected void | serverinfo(PrintWriter
Writer to render to writer, StringManager i18n support for current client's locale smClient)Writes System OS and JVM properties. |
| protected void | sessions(PrintWriter
Writer to render to writer, ContextName Name of the application to list session information for cn, int Expire all sessions with idle time > idle for this context idle, StringManager i18n support for current client's locale smClient)Session information for the web application at the specified context path. |
| public void | setWrapper(Wrapper
The new wrapper wrapper)Implements org. Set the Wrapper with which we are associated. |
| private void | |
| protected void | |
| private void | |
| protected void | |
| protected void | start(PrintWriter
Writer to render to writer, ContextName Name of the application to be started cn, StringManager i18n support for current client's locale smClient)Start the web application at the specified context path. |
| protected void | stop(PrintWriter
Writer to render to writer, ContextName Name of the application to be stopped cn, StringManager i18n support for current client's locale smClient)Stop the web application at the specified context path. |
| protected void | threadDump(PrintWriter
The output writer writer, StringManager StringManager for the client's locale smClient, Enumeration<Locale> the client's locales requestedLocales)Write a JVM thread dump. |
| protected boolean | Returns: true if the application was marked as being serviced and false if the application was
already marked as being servicedThe context name name)Attempt to mark a context as being serviced |
| protected void | undeploy(PrintWriter
Writer to render to writer, ContextName Name of the application to be removed cn, StringManager i18n support for current client's locale smClient)Undeploy the web application at the specified context path. |
| protected void | uploadWar(PrintWriter
Writer to render to writer, HttpServletRequest The servlet request we are processing request, File The file into which we should store the uploaded WAR war, StringManager The StringManager used to construct i18n messages based on the Locale of the client smClient)Upload the WAR file included in this request, and store it at the specified file location. |
| protected static boolean | |
| protected void | vmInfo(PrintWriter
The output writer writer, StringManager StringManager for the client's locale smClient, Enumeration<Locale> the client's locales requestedLocales)Write some VM info. |
| private void |
| configBase | back to summary |
|---|---|
| protected File configBase Path where context descriptors should be deployed. | |
| context | back to summary |
|---|---|
| protected transient Context context The Context container associated with our web application. | |
| debug | back to summary |
|---|---|
| protected int debug The debugging detail level for this servlet. | |
| global | back to summary |
|---|---|
| protected transient Context global The global JNDI | |
| host | back to summary |
|---|---|
| protected transient Host host The associated host. | |
| mBeanServer | back to summary |
|---|---|
| protected transient MBeanServer mBeanServer MBean server. | |
| oname | back to summary |
|---|---|
| protected ObjectName oname The associated deployer ObjectName. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| sm | back to summary |
|---|---|
| protected static final StringManager sm The string manager for this package. | |
| versioned | back to summary |
|---|---|
| protected File versioned Path used to store revisions of webapps. | |
| wrapper | back to summary |
|---|---|
| protected transient Wrapper wrapper The Wrapper container associated with this servlet. | |
| ManagerServlet | back to summary |
|---|---|
| public ManagerServlet() | |
| check | back to summary |
|---|---|
| protected void check(String name) throws Exception Invoke the check method on the deployer. | |
| deploy | back to summary |
|---|---|
| protected void deploy(PrintWriter writer, String config, ContextName cn, String tag, boolean update, HttpServletRequest request, StringManager smClient) Deploy a web application archive (included in the current request) at the specified context path.
| |
| deploy | back to summary |
|---|---|
| protected void deploy(PrintWriter writer, ContextName cn, String tag, StringManager smClient) Install an application for the specified path from the specified web application archive.
| |
| deploy | back to summary |
|---|---|
| protected void deploy(PrintWriter writer, String config, ContextName cn, String war, boolean update, StringManager smClient) Install an application for the specified path from the specified web application archive.
| |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides jakarta. Implements jakarta. Finalize this servlet.
| |
| doGet | back to summary |
|---|---|
| public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException Overrides jakarta. Process a GET request for the specified resource.
| |
| doPut | back to summary |
|---|---|
| public void doPut(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException Overrides jakarta. Process a PUT request for the specified resource.
| |
| expireSessions | back to summary |
|---|---|
| protected void expireSessions(PrintWriter writer, ContextName cn, HttpServletRequest req, StringManager smClient) Extract the expiration request parameter
| |
| findleaks | back to summary |
|---|---|
| protected void findleaks(boolean statusLine, PrintWriter writer, StringManager smClient) Find potential memory leaks caused by web application reload.
| |
| getConnectorCerts | back to summary |
|---|---|
| protected Map | |
| getConnectorCiphers | back to summary |
|---|---|
| protected Map | |
| getConnectors | back to summary |
|---|---|
| private Connector[] getConnectors() | |
| getConnectorTrustedCerts | back to summary |
|---|---|
| protected Map | |
| getWrapper | back to summary |
|---|---|
| public Wrapper getWrapper() Implements org. Return the Wrapper with which we are associated.
| |
| init | back to summary |
|---|---|
| public void init() throws ServletException Overrides jakarta. Initialize this servlet.
| |
| isDeployed | back to summary |
|---|---|
| protected boolean isDeployed(String name) throws Exception Invoke the isDeployed method on the deployer. | |
| list | back to summary |
|---|---|
| protected void list(PrintWriter writer, StringManager smClient) Render a list of the currently active Contexts in our virtual host.
| |
| printResources | back to summary |
|---|---|
| protected void printResources(PrintWriter writer, String prefix, Context namingContext, String type, StringManager smClient) List the resources of the given context.
| |
| reload | back to summary |
|---|---|
| protected void reload(PrintWriter writer, ContextName cn, StringManager smClient) Reload the web application at the specified context path.
| |
| removeServiced | back to summary |
|---|---|
| protected void removeServiced(String name) throws Exception Invoke the removeServiced method on the deployer. | |
| resources | back to summary |
|---|---|
| protected void resources(PrintWriter writer, String type, StringManager smClient) Render a list of available global JNDI resources.
| |
| save | back to summary |
|---|---|
| protected synchronized void save(PrintWriter writer, String path, StringManager smClient) Store server configuration.
| |
| serverinfo | back to summary |
|---|---|
| protected void serverinfo(PrintWriter writer, StringManager smClient) Writes System OS and JVM properties.
| |
| sessions | back to summary |
|---|---|
| protected void sessions(PrintWriter writer, ContextName cn, int idle, StringManager smClient) Session information for the web application at the specified context path. Displays a profile of session thisAccessedTime listing number of sessions for each 10 minute interval up to 10 hours.
| |
| setWrapper | back to summary |
|---|---|
| public void setWrapper(Wrapper wrapper) Implements org. Set the Wrapper with which we are associated. | |
| sslConnectorCerts | back to summary |
|---|---|
| private void sslConnectorCerts(PrintWriter writer, StringManager smClient) | |
| sslConnectorCiphers | back to summary |
|---|---|
| protected void sslConnectorCiphers(PrintWriter writer, StringManager smClient) | |
| sslConnectorTrustedCerts | back to summary |
|---|---|
| private void sslConnectorTrustedCerts(PrintWriter writer, StringManager smClient) | |
| sslReload | back to summary |
|---|---|
| protected void sslReload(PrintWriter writer, String tlsHostName, StringManager smClient) | |
| start | back to summary |
|---|---|
| protected void start(PrintWriter writer, ContextName cn, StringManager smClient) Start the web application at the specified context path.
| |
| stop | back to summary |
|---|---|
| protected void stop(PrintWriter writer, ContextName cn, StringManager smClient) Stop the web application at the specified context path.
| |
| threadDump | back to summary |
|---|---|
| protected void threadDump(PrintWriter writer, StringManager smClient, Enumeration<Locale> requestedLocales) Write a JVM thread dump.
| |
| tryAddServiced | back to summary |
|---|---|
| protected boolean tryAddServiced(String name) throws Exception Attempt to mark a context as being serviced | |
| undeploy | back to summary |
|---|---|
| protected void undeploy(PrintWriter writer, ContextName cn, StringManager smClient) Undeploy the web application at the specified context path.
| |
| uploadWar | back to summary |
|---|---|
| protected void uploadWar(PrintWriter writer, HttpServletRequest request, File war, StringManager smClient) throws IOException Upload the WAR file included in this request, and store it at the specified file location.
| |
| validateContextName | back to summary |
|---|---|
| protected static boolean validateContextName(ContextName cn, PrintWriter writer, StringManager smClient) | |
| vmInfo | back to summary |
|---|---|
| protected void vmInfo(PrintWriter writer, StringManager smClient, Enumeration<Locale> requestedLocales) Write some VM info.
| |
| writeDeployResult | back to summary |
|---|---|
| private void writeDeployResult(PrintWriter writer, StringManager smClient, String name, String displayPath) | |