On Sun, 26 Jan 2003, Kirill Maximov wrote:
> Date: Sun, 26 Jan 2003 16:57:17 +0300 > From: Kirill Maximov <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: How to get IP address Tomcat bound to. > > I have a programming question - how can I get > the IP address the TomCat is bound to ? Is this possible? > > I suppose, I have to use some internal TomCat API here .. > How Tomcat binds is based on the parameters to the attributes of your <Connector> element. By default, it will bind on all attached IP addresses, but you can limit it to one by using an "address" attribute on the <Connector> -- see the config docs for more: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/ There is no portable API to retrieve this information from a servlet, however. On a given request, you can ask which address the request was received on by calling request.getServerAddr(). > With kind regards, > Kirill Maximov > Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
