tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nelson, Tracy M." <Tracy.Nel...@nelnet.net>
Subject RE: Need a way to identify tomcat instances at run-time
Date Fri, 24 Aug 2007 17:11:27 GMT
| From: Brian Barnett [mailto:brian@calcxml.com]
| Sent: Friday, 24 August, 2007 11:54
| 
| I have a struts-based application running on multiple tomcat
instances,
| load
| balanced by a hardware load balancer, i.e., no Apache Web Server. I
need a
| way at run-time to know which tomcat instance it is. Is there a way to
| access info in the server.xml or context.xml file at run-time? Can I
| specify
| some arbitrary value in either of those xml files that would be
available
| at
| run-time?

You could pass something as an init-param to your servlets.  Or you can
get the server name from the HttpRequest.  If you're not deploying each
instance from a common war file, you could stick a simple config file in
your WEB-INF directory with some kind of instance name or ID.
 

-----------------------------------------
------------------------------------------------------------
The information contained in this message is confidential
proprietary property of Nelnet, Inc. and its affiliated 
companies (Nelnet) and is intended for the recipient only.
Any reproduction, forwarding, or copying without the express
permission of Nelnet is strictly prohibited. If you have
received this communication in error, please notify us
immediately by replying to this e-mail.
------------------------------------------------------------

---------------------------------------------------------------------
To start a new topic, e-mail: users@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