Re: Tomcat and multiple IP addresses

2006-09-19 Thread Martin Gainty
server.xml
Host spec for Standalone configuration
 

Host for top level Catalina container


HTH
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, September 18, 2006 8:42 PM
Subject: RE: Tomcat and multiple IP addresses


> From: Ping Yu [mailto:[EMAIL PROTECTED] 
> Subject: Tomcat and multiple IP addresses
> 
> Are there any ways that I can get to know which IP address
> that Tomcat starts with in a single machine?

Unless a specific IP address is configured for a connector, Tomcat
listens on all IP addresses on the machine.  If Tomcat is set up for a
specific address, you'll have to know that address or a DNS name that
resolves to it.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and multiple IP addresses

2006-09-19 Thread David Smith

So let's see if I read your message correctly:

You want to upload a file from Machine A to Machine B. Machine A has 
several IP addresses and you aren't sure which one Tomcat will use to 
attempt contact with Machine B.


I think from the receiving end, you can use request.getRemoteAddr() to 
know where a request came from. On the sending end, I don't think there 
is much you can do to control which IP is the source.


--David

Ping Yu wrote:


Hi,
  
 I have a question that I would like ask help or suggestions from people in this maillist. 
  
 I would like to transfer a file from Machine A to Machine B. In Machine A, there are several IP addresses. However, the IP address launched by Tomcat might be different from the IP address I choose to transfer the file. Are there any ways that I can get to know which IP address that Tomcat starts with in a single machine? Are there any APIs or classes for this? Then I can use the IP address started by Tomcat to transfer my file.
  
 Thank you very much!
  
 Ping



-
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat and multiple IP addresses

2006-09-19 Thread Peter Crowther
> From: Ping Yu [mailto:[EMAIL PROTECTED] 
>   I would like to transfer a file from Machine A to Machine 
> B. In Machine A, there are several IP addresses. However, the 
> IP address launched by Tomcat might be different from the IP 
> address I choose to transfer the file. Are there any ways 
> that I can get to know which IP address that Tomcat starts 
> with in a single machine? Are there any APIs or classes for 
> this? Then I can use the IP address started by Tomcat to 
> transfer my file.

As Chuck pointed out, by default Tomcat will listen on all addresses -
unless you have a very odd IP stack.  Why are you expecting Tomcat only
to bind to one of the addresses?

If you know what port Tomcat's on, and that port is unique on your
machine, you could run "netstat -an" on Windows or most UNIXes to obtain
the list of IP address and port mappings, then match on the port number
and extract the local IP address for the LISTENING socket.  But it's a
horrible hack.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat and multiple IP addresses

2006-09-18 Thread Caldarale, Charles R
> From: Ping Yu [mailto:[EMAIL PROTECTED] 
> Subject: Tomcat and multiple IP addresses
> 
> Are there any ways that I can get to know which IP address
> that Tomcat starts with in a single machine?

Unless a specific IP address is configured for a connector, Tomcat
listens on all IP addresses on the machine.  If Tomcat is set up for a
specific address, you'll have to know that address or a DNS name that
resolves to it.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]