Hello. How to figure out the Client IP (or client ip behind proxy) using standalone grizzly (with no glassfish installed) .
I've tried the following code and this returns NULL in request.remoteAddr();
I've tried to test the code both from local and remote computer.
I have the
grizzly-http-webserver-1.6.1/http-1.6.1.jar, lib/framework-1.6.1.jar, lib/http-utils-1.6.1.jar, lib/rcm-1.6.1.jar in classpath.
I've tried the restlet project with grizzly connector before and bump into the same situation. While jetty has returned user ip, grizzly does nothing. Please, point me what i need to change in code to figure out the user ip even user is located behind the proxy.
Re: can't figure out ClientIP (request.remoteAddr())
You may not be a Grizzly expert, but you are quickly becoming one. ;-)
Thanks for jumping in and helping with questions.
Alan Williamson wrote:
> You need to tell Grizzly you want to read this information
> in your service method put in:
> req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null);
> [don't fool me for a Grizzly expert, this question i asked just last
> week and Jeanfrancois contribued the answer]
> Xasima Xirohata wrote:
>> Hello. How to figure out the Client IP (or client ip behind proxy)
>> using standalone grizzly (with no glassfish installed) .