How to get country name using geocode?
-
29-09-2019 - |
Question
I want to use geocode to get current country name where the site is loaded.
I have to store country name in session. Also have a JavaScript to find out country name but I used jsp pages so it won't allow to store JavaScript variable in JSP session. In geocode GClientGeocoder() class is there. But how to get address from it?
Solution
Instead of geocode I used Locale class of java in jsp which gives default country.
OTHER TIPS
You use this lib.
Java IP (InetAddress) Locator http://sourceforge.jp/projects/sfnet_javainetlocator/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow