• 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Locating country from which request is made

 
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
How can i know the name of the country from which an access to a particular jsp page was made? I know gives the IP of the client but i cannot figure out how to tell the country. Any idea?
Thanks in advance.
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MaxMind Geo Lite is one of the few free options. For better accuracy you'll have to get a commercial solution.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,
I thank you for your reply. I need a freely available thing. So i will try the option you provided.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
I downloaded the csv Geolite Country database. I have opened it and it contains 6 fields which i do not know the meanings. I wanted to send the csv file to a mysql database using a java program but i am not able to do that since i don't know how to define the columns of the new table. Do you have any idea about what the fields in the csv file represent?
Kind regards
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never bothered to look at the file. What are you trying to achieve by importing the data into a DB?
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good morning Ulf,
Thanks again for your reply.


What are you trying to achieve by importing the data into a DB?


Isn't it easier to manipulate records in a table than a flat file? I want to map a given IP address to a specific country. And i think the database file does that.
If one does not bother to know the content of the file, how can one process it?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By using the API that goes with it; it's on GitHub. I generally use it so that the file is loaded entirely into memory for performance reasons. The API docs talk about that.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf,
I will be so grateful if you could tell
me more. I went to the github website,
created an account but could not find
the API. Can you provide a ink?
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need an account. Search for "maxmind java api site:github.com" or some such phrase.
 
Paul Ngom
Ranch Hand
Posts: 355
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Ulf,
I will check that. I will get back to you soon.
 
A feeble attempt to tell you about our stuff that makes us money
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!