• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Need to know Location of Client

 
Ranch Hand
Posts: 150
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7100
165
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 150
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Tim Moores.

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


 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic