Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to obtain country of a client connection?
How to obtain country of a client connection? [message #1803160] Sun, 24 February 2019 03:04 Go to next message
Eclipse UserFriend
Hi,

When a user connects a RAP web application, how to obtain the client information, such as from which country?

Thank you!

David

[Updated on: Sun, 24 February 2019 03:06] by Moderator

Re: How to obtain country of a client connection? [message #1803176 is a reply to message #1803160] Sun, 24 February 2019 14:30 Go to previous messageGo to next message
Eclipse UserFriend
RWT.getRequest returns an HttpServletRequest
From there it's up to you to determine the IP address and from there, the country.
Re: How to obtain country of a client connection? [message #1803465 is a reply to message #1803176] Fri, 01 March 2019 02:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi,Chris,

Thank you for reply!
Yes, I knew RWT.getRequest().getRemoteAddr() can get the client IP, is there a way to directly get the "country of the connected client" from the RWT/RAP api without any other 3rd party?
Re: How to obtain country of a client connection? [message #1803539 is a reply to message #1803465] Sun, 03 March 2019 14:10 Go to previous message
Eclipse UserFriend
No, that requires a database to map IP addresses to countries.
If you wish to do this for locale reasons, you can check the Accept-Language header
Previous Topic:Password Text field, RAP 3.7, Firefox 65
Next Topic:check size and format before FileUpload
Goto Forum:
  


Current Time: Sun Jul 13 17:21:51 EDT 2025

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

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

Back to the top