• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Need to know Location of Client

 
Ranch Hand
Posts: 139
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a web application written in Struts 2.0. As part of requirements I need show affiliate links only for users of specific location like Florida US , and another link for UK and so.

How can I get the user location in Struts 2.0 web applicaiton.

thanks in advance.

Regards,
Bala.
 
Saloon Keeper
Posts: 6588
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts comes with nothing of the sort built in. You can look up the client IP free of charge in a database like Geolite2. I have implemented that in an app of mine to good effect. The free version gives you the country and often the city as well. If you need more than that, you'll need to pay.

There are similar databases available, like IP2Location.
 
Bala Tilak
Ranch Hand
Posts: 139
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim Moores.

Geolite2 database is good for my purpose. Thanks a lot for quick response.


 
I've never won anything before. Not even a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic