Yes of course, that makes sense. I will use Vamsi's suggestion with
ServletRequest.getServerPort(). Thank you.
-Original Message-
From: David Delbecq [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 23, 2007 2:03 PM
To: Tomcat Users List
Subject: Re: How to get port of a running T
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletRequest.html#getLocalPort()
You can only get the port from a request. This is because a sepecific
webapp can be served from serveral hostname and from several port, all
sharing same instance of servlet.
(basic example is tomcat with v
I do not know if this info is helpful... ServletRequest has getServerPort()
and getServerName() methods that should give the port and server through
which the request came.
Vamsi
On 8/24/07, Brian Barnett <[EMAIL PROTECTED]> wrote:
>
> Can someone provide a java code snippet showing how to get t
Can someone provide a java code snippet showing how to get the port that
Tomcat is listening on? Is there a way to access the settings in the
server.xml file from within a running instance of Tomcat?
I'm running a Struts-based app on Tomcat 5.5 (multiple Tomcat instances
actually) and need to know