• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help: apache work with tomcat

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to get remote user information using request.getRemoteAddr(),
things working great on Tomcat alone, however, if I try to use Apache proxy
support have some problems. Here is the situation:

1) Client 192.168.1.1----------->tomcat server
http://192.168.1.2:8080/myservlet , and servlet return remoteAddr
192.168.1.1, works great.
2) Client 192.168.1.1-----------> apache server http://192.168.1.2/myservlet
(through Apache proxy support redirect to
http://192.168.1.2:8080/myservlet), servlet return remoteAddr is
192.168.1.2, which is server's address

I guess 2) mistake request come from server itself instead of client machine
because request get forwarded.
Anyone knows if there is work around or other method that I can use to get
client information from tomcat servlet?
 
author
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does switching UseCanonicalName Off (or On) make any difference?
David
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic