I'm using a Glassfish webserver to run my website. I'm still developing the website and I'd like to trace the location from where people attempt to use the website. In particular, I would like to be able to block all of Africa and the Middle East from accessing my website in an attempt to prevent fraud. I'd additionally like to know someone's location to show them related content to their location on the website. For example, if a user accesses the site from Dallas, Texas he would see Dallas, Texas content.
I'm using jsp/Java and would prefer such a solution.
I guess this is done by somehow tracing an IP address to a location.