tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Michaels <jor...@viviotech.net>
Subject Re: Adding/removing hosts dynamically?
Date Fri, 22 Jan 2010 17:30:23 GMT

Thanks Chuck,

I was able to find it and play with it a little bit. Pretty 
self-explanatory once I figured out how to modify the tomcat-users.xml 
file to get access to it.

It's a real bummer that it's not persistent, but it's still a great app.

Thanks for your help!

-Jordan


Caldarale, Charles R wrote:
>> From: Jordan Michaels [mailto:jordan@viviotech.net]
>> Subject: Re: Adding/removing hosts dynamically?
>>
>> I'm extremely interested in this. Any chance anyone who has used this
>> before could provide some direction (example implementation)?
> 
> Try the HTML version of host-manager to get familiar with it:
> http://localhost:8080/host-manager/html
> 
> Note that the updates made by the HTML and plain text servlets are not persistent, so
will be lost upon Tomcat restart.  You'll need some additional means to preserve the added
hosts.
> 
>>>From the org/apache/catalina/manager/host/HostManagerServlet.java source code:
> 
> * Servlet that enables remote management of the virtual hosts installed
>  * on the server.  Normally, this functionality will be protected by 
>  * a security constraint in the web application deployment descriptor.  
>  * However, this requirement can be relaxed during testing.
>  * <p>
>  * This servlet examines the value returned by <code>getPathInfo()</code>
>  * and related query parameters to determine what action is being requested.
>  * The following actions and parameters (starting after the servlet path)
>  * are supported:
>  * <ul>
>  * <li><b>/add?name={host-name}&aliases={host-aliases}&manager={manager}</b>
-
>  *     Create and add a new virtual host. The <code>host-name</code> attribute
>  *     indicates the name of the new host. The <code>host-aliases</code>

>  *     attribute is a comma separated list of the host alias names. 
>  *     The <code>manager</code> attribute is a boolean value indicating if
the
>  *     webapp manager will be installed in the newly created host (optional, 
>  *     false by default).</li>
>  * <li><b>/remove?name={host-name}</b> - Remove a virtual host. 
>  *     The <code>host-name</code> attribute indicates the name of the host.
>  *     </li>
>  * <li><b>/list</b> - List the virtual hosts installed on the server.
>  *     Each host will be listed with the following format 
>  *     <code>host-name#host-aliases</code>.</li>
>  * <li><b>/start?name={host-name}</b> - Start the virtual host.</li>
>  * <li><b>/stop?name={host-name}</b> - Stop the virtual host.</li>
>  * </ul>
>  * <p>
>  * <b>NOTE</b> - 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.
>  * <p>
> 
> Seems like the javadocs aren't currently installed on tomcat.apache.org, or I would have
directed you there.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and
is thus for use only by the intended recipient. If you received this in error, please contact
the sender and delete the e-mail and its attachments from all computers.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message