How to obtain browser client's IP Address [message #1061343] |
Fri, 31 May 2013 09:58 |
|
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
---
Just because you can doesn't mean you should
[Updated on: Fri, 31 May 2013 10:07] Report message to a moderator
|
|
|
|
|
|
Re: How to obtain browser client's IP Address [message #1061376 is a reply to message #1061372] |
Fri, 31 May 2013 11:34 |
|
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
---
Just because you can doesn't mean you should
|
|
|
Re: How to obtain browser client's IP Address [message #1061636 is a reply to message #1061376] |
Mon, 03 June 2013 11:30 |
Ivan Furnadjiev Messages: 2427 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.04362 seconds