org.apache.catalina.manager.host
public class HostManagerServlet extends HttpServlet implements ContainerServlet
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:
host-name
attribute
indicates the name of the new host. The host-aliases
attribute is a comma separated list of the host alias names.
The manager
attribute is a boolean value indicating if the
webapp manager will be installed in the newly created host (optional,
false by default).host-name
attribute indicates the name of the host.
host-name#host-aliases
.NOTE - Attempting to stop or remove the host containing this servlet itself will not succeed. Therefore, this servlet should generally be deployed in a separate virtual host.
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:
Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $
Field Summary | |
---|---|
protected File | configBase
Path where context descriptors should be deployed. |
protected Context | context
The Context container associated with our web application. |
protected int | debug
The debugging detail level for this servlet. |
protected Engine | engine
The associated engine. |
protected Host | host
The associated host. |
protected MBeanServer | mBeanServer
MBean server. |
protected static StringManager | sm
The string manager for this package. |
protected Wrapper | wrapper
The Wrapper container associated with this servlet. |
Method Summary | |
---|---|
protected void | add(HttpServletRequest request, PrintWriter writer, String name, boolean htmlMode)
Add host with the given parameters.
|
protected void | add(PrintWriter writer, String name, String aliases, String appBase, boolean manager, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs, boolean xmlNamespaceAware, boolean xmlValidation)
Add a host using the specified parameters.
|
protected boolean | booleanParameter(HttpServletRequest request, String parameter, boolean theDefault, boolean htmlMode)
extract boolean value from checkbox with default |
void | destroy()
Finalize this servlet. |
void | doGet(HttpServletRequest request, HttpServletResponse response)
Process a GET request for the specified resource.
|
protected File | getConfigBase(String hostName)
Get config base. |
Wrapper | getWrapper()
Return the Wrapper with which we are associated. |
void | init()
Initialize this servlet. |
protected void | list(PrintWriter writer)
Render a list of the currently active Contexts in our virtual host.
|
protected void | remove(PrintWriter writer, String name)
Remove the specified host.
|
void | setWrapper(Wrapper wrapper)
Set the Wrapper with which we are associated.
|
protected void | start(PrintWriter writer, String name)
Start the host with the specified name.
|
protected void | stop(PrintWriter writer, String name)
Start the host with the specified name.
|
Parameters: request The request writer The output writer name The host name htmlMode Flag value
Parameters: writer Writer to render results to name host name aliases comma separated alias list appBase application base for the host manager should the manager webapp be deployed to the new host ?
Parameters: request parameter theDefault htmlMode
Returns:
Parameters: request The servlet request we are processing response The servlet response we are creating
Throws: IOException if an input/output error occurs ServletException if a servlet-specified error occurs
Parameters: writer Writer to render to
Parameters: writer Writer to render results to name host name
Parameters: wrapper The new wrapper
Parameters: writer Writer to render to name Host name
Parameters: writer Writer to render to name Host name