You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by meamit221 <am...@aceicon.com> on 2009/03/18 15:26:11 UTC

Load server.xml without restarting Tomcat 5.5.26 Server

Hi,
   I am using Tomcat 5.5.26 server for my application. I need to add a host
entry inside server.xml everytime a user registers himself. But the server
does not recognize the new entry without restarting server. Is it possible
to reload the server.xml without restarting the server?

   
-- 
View this message in context: http://www.nabble.com/Load-server.xml-without-restarting-Tomcat-5.5.26-Server-tp22579538p22579538.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: Load server.xml without restarting Tomcat 5.5.26 Server

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: meamit221 [mailto:amit.nath@aceicon.com] 
> Subject: RE: Load server.xml without restarting Tomcat 5.5.26 Server
> 
> However, can you assist me with some hints that can help me 
> to do so (with Tomcat APIs)?

Since you're running 5.5, you can use the admin webapp to dynamically add <Host> elements.  However, this webapp does not persist any config changes, nor was it carried forward to newer Tomcat levels.  Consequently, you might want to develop your own webapp that does just the specific tasks you're interested in, so it will be usable on newer Tomcat versions (although the APIs may be somewhat different).

You could use the admin source and the API docs as reference:
http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.26/src/
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/index.html

 - 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


RE: Load server.xml without restarting Tomcat 5.5.26 Server

Posted by meamit221 <am...@aceicon.com>.

Thanks Charles for quick reply.
However, can you assist me with some hints that can help me to do so (with
Tomcat APIs)?


Caldarale, Charles R wrote:
> 
>> From: meamit221 [mailto:amit.nath@aceicon.com] 
>> Subject: Load server.xml without restarting Tomcat 5.5.26 Server
>> 
>> Is it possible to reload the server.xml without restarting the server?
> 
> No.  However, if you examine the Tomcat source, you can build a webapp to
> call the appropriate APIs to register the new host; you may also be able
> to do the same via JMX.
> 
>  - 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Load-server.xml-without-restarting-Tomcat-5.5.26-Server-tp22579538p22594121.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: Load server.xml without restarting Tomcat 5.5.26 Server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Amit,

On 3/18/2009 10:36 AM, Caldarale, Charles R wrote:
>> From: meamit221 [mailto:amit.nath@aceicon.com] 
>> Subject: Load server.xml without restarting Tomcat 5.5.26 Server
>>
>> Is it possible to reload the server.xml without restarting the server?
> 
> No. However, if you examine the Tomcat source, you can build a 
> webapp to call the appropriate APIs to register the new host; you may
> also be able to do the same via JMX.

Don't forget to also record this host information somewhere on the disk,
otherwise you will lose all your host info when you restart.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknBDS0ACgkQ9CaO5/Lv0PDD3QCeJfcwE52MPJk2WSsfeXUbTupP
+xsAoJgANTNw4cAHJCvhkO8PsgW3q/Z0
=SIob
-----END PGP SIGNATURE-----

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


RE: Load server.xml without restarting Tomcat 5.5.26 Server

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: meamit221 [mailto:amit.nath@aceicon.com] 
> Subject: Load server.xml without restarting Tomcat 5.5.26 Server
> 
> Is it possible to reload the server.xml without restarting the server?

No.  However, if you examine the Tomcat source, you can build a webapp to call the appropriate APIs to register the new host; you may also be able to do the same via JMX.

 - 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