You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris <ch...@gmx.at> on 2015/04/13 01:20:58 UTC
retrieve public ip adress
Hi all,
I have deployed the Wicket app on a PAAS provider and would like to save the IP address of the users accessing the application.
With following code, the ip address retrieved is always the internal one (192.168.0.1) when I access the application - I would like to retrieve the public ip address assigned by the internet provider.
How is this possible?
HttpServletRequest httpReq = (HttpServletRequest) req.getContainerRequest();
String clientAddress = httpReq.getRemoteAddr();
Thanks, Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: retrieve public ip adress
Posted by Chris <ch...@gmx.at>.
Thanks!
Chris
> Am 13.04.2015 um 09:50 schrieb Francois Meillet <fr...@gmail.com>:
>
> Look at the getRemoteAddr(RequestCycle requestCycle) method from org.apache.wicket.protocol.http.request.WebClientInfo
>
> François Meillet
>
>
>
>
>
>
>
>
> Le 13 avr. 2015 à 01:20, Chris <ch...@gmx.at> a écrit :
>
>> Hi all,
>>
>> I have deployed the Wicket app on a PAAS provider and would like to save the IP address of the users accessing the application.
>>
>> With following code, the ip address retrieved is always the internal one (192.168.0.1) when I access the application - I would like to retrieve the public ip address assigned by the internet provider.
>>
>> How is this possible?
>>
>> HttpServletRequest httpReq = (HttpServletRequest) req.getContainerRequest();
>> String clientAddress = httpReq.getRemoteAddr();
>>
>> Thanks, Chris
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: retrieve public ip adress
Posted by Francois Meillet <fr...@gmail.com>.
Look at the getRemoteAddr(RequestCycle requestCycle) method from org.apache.wicket.protocol.http.request.WebClientInfo
François Meillet
Le 13 avr. 2015 à 01:20, Chris <ch...@gmx.at> a écrit :
> Hi all,
>
> I have deployed the Wicket app on a PAAS provider and would like to save the IP address of the users accessing the application.
>
> With following code, the ip address retrieved is always the internal one (192.168.0.1) when I access the application - I would like to retrieve the public ip address assigned by the internet provider.
>
> How is this possible?
>
> HttpServletRequest httpReq = (HttpServletRequest) req.getContainerRequest();
> String clientAddress = httpReq.getRemoteAddr();
>
> Thanks, Chris
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>