1

My tomcat server runs on YYYY machine and client runs on XXXX and whenever the request comes to YYYY, it processes the request sending the request to another machine.

My server.http looks like-->
<Service name="MyService">
    <Connector port="3096"
       maxThreads="50" minSpareThreads="50" maxSpareThreads="50"
       debug="0" acceptCount="100" connectionTimeout="60000"
       enableLookups="true" address="YYYY"/>
    <Engine name="standalone" defaultHost="localhost">

The servlet which processes the request has the getRemoteHost() as "YYYY". Can anyone please give any light how can I get the client info (host and port)?

Thanks.

Raptor
  • 53,206
  • 45
  • 230
  • 366
Arpeet
  • 211
  • 2
  • 5

1 Answers1

0

I guess you are asking about this. If not let me know more about that you want to know.

request.getRemoteAddr(); //Where the client is commong from => ip address.
request.getRemotePort(); //where the client is using port => port.
Zippy
  • 1,804
  • 5
  • 27
  • 36