users@glassfish.java.net

fronting gf with SunWebServer7, forward-ip problem

From: <glassfish_at_javadesktop.org>
Date: Mon, 03 Nov 2008 10:01:47 PST

Hi,

I'm fronting my Glassfish 2.1 with the Sun Webserver7. The setup as a whole works smooth but I have a problem who bothers me:

When accesing the Client IP within my j2ee code like this:

[code]
request.getRemoteAddr()
[/code]

the IP I get always is 127.0.0.1.

At first I thought its is a problem with SunWebServer7 but when posting in the corresponding forum, they delegated me here.

The source post can be found at:
http://forums.sun.com/thread.jspa?threadID=5344683

They basically say that:
"The fact lbplugin or Web Server's built-in reverse proxy are forwarding the client IP in a header doesn't mean GlassFish is going to return it when you invoke HttpServletRequest.getRemoteAddr"

So I'm seeking here for help.

I'd appreciate any help,
Thanks in advance,
callisto79
[Message sent by forum member 'callisto79' (callisto79)]

http://forums.java.net/jive/thread.jspa?messageID=314595