Feature request. We want to know more about the user in order to give him more refined, targeted experience. For that it would be useful to know from what country this user is accessing our site.
I did the following search: https://sourceforge.net/search/?type_of_search=soft&words=recognize+country+ip , among them this one https://sourceforge.net/projects/javainetlocator/ looks promising. Askhat, please incorporate this (or another one if you find better) library.
Requirements:
1) To have a new http session argument USER_COUNTRY that would contain the id of the country. The recognition should be done only if this argument is not present in session and this is not a robot: in order not to perform this lookup for every request.
2) Add a new field in table APP_USER.LAST_LOGIN_COUNTRY that would contain the country code of the last login (can be populated together with LAST_LOGIN_DATE). It will be useful to have this information for future reports.
3) Somewhere on the site (maybe next to the username) show the flag of this country (this one can be used: https://sourceforge.net/projects/flags )