Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to obtain browser client's IP Address(Getting client's actual IP Address in RAP)
How to obtain browser client's IP Address [message #1061343] Fri, 31 May 2013 05:58 Go to next message
Eclipse UserFriend
Hi, is there a bullet-proof method to get the IP Address of the physical client that is connected to a RAP (or Tabris) server?

I see in RWT we have:

RWT.getRequest().getRemoteAddr()


...but this may not return the IP address of the client machine itself - it seems to return our proxy server's IP address instead, on our network, which is not good enough for our applications.

Also, this method does not appear to be available in Tabris (RWT.getRequest() hardly has anything implemented), so I need something more generic that will work accurately across all RAP/Tabris clients.

The background to this is that I need to be able to identify each physical device/machine that connects into my RAP server, as I'd like to store preferences for that machine. Perhaps there is another way to do it?

Thanks, John

[Updated on: Fri, 31 May 2013 06:07] by Moderator

Re: How to obtain browser client's IP Address [message #1061359 is a reply to message #1061343] Fri, 31 May 2013 06:22 Go to previous messageGo to next message
Eclipse UserFriend
Not sure I want to use IP Address after all... just revisiting the SessionStore (cookies?) class again to see if that is really what I need...
Re: How to obtain browser client's IP Address [message #1061365 is a reply to message #1061359] Fri, 31 May 2013 06:50 Go to previous messageGo to next message
Eclipse UserFriend
Hi John,
maybe you mean SettingStore :-)
Best,
Ivan

On 5/31/2013 1:22 PM, John Gymer wrote:
> Not sure I want to use IP Address after all... just revisiting the
> SessionStore (cookies?) class again to see if that is really what I
> need...
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: How to obtain browser client's IP Address [message #1061372 is a reply to message #1061365] Fri, 31 May 2013 07:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ivan,
Thanks, and yes, indeed, I do mean SettingStore.
I had forgotten about that library - works perfectly!
Cheers, John
Re: How to obtain browser client's IP Address [message #1061376 is a reply to message #1061372] Fri, 31 May 2013 07:34 Go to previous messageGo to next message
Eclipse UserFriend
A further question on this... SettingStore uses Cookies, which have a default expiry of 30 days. How do I persist this, or change to non-expiring Cookies? Is it just a case of reading a Cookie, or do I need to update it, or delete+recreate?

The problem as I see it is that if a user makes various preference changes to their display, they don't want to have to do this again after 30 days... or does the 30 days start from the last 'access' (read?) of the Cookie value, in which case it isn't a problem?

Thanks, John
Re: How to obtain browser client's IP Address [message #1061636 is a reply to message #1061376] Mon, 03 June 2013 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi John,
the SettingStore cookie is set to expire in 3 months after the last
'access'. With every SettingStore access this cookie is prolonged for
another 3 months.
Best,
Ivan

On 5/31/2013 2:34 PM, John Gymer wrote:
> A further question on this... SettingStore uses Cookies, which have a
> default expiry of 30 days. How do I persist this, or change to
> non-expiring Cookies? Is it just a case of reading a Cookie, or do I
> need to update it, or delete+recreate?
>
> The problem as I see it is that if a user makes various preference
> changes to their display, they don't want to have to do this again
> after 30 days... or does the 30 days start from the last 'access'
> (read?) of the Cookie value, in which case it isn't a problem?
>
> Thanks, John
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: How to obtain browser client's IP Address [message #1061643 is a reply to message #1061636] Mon, 03 June 2013 07:44 Go to previous message
Eclipse UserFriend
Thank-you Ivan.
That was exactly what I wanted to hear!!
Cheers, John
Previous Topic:RAP Client Scripting extension
Next Topic:Can't launsch as RWT application in eclipse because Maven dependency "javax.servlet"
Goto Forum:
  


Current Time: Wed Jul 02 07:12:38 EDT 2025

Powered by FUDForum. Page generated in 0.04674 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top