Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can you get client location from HttpServletRequest

 
Ronwaldo Cruz
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

Is it possible to get client location information from HttpServletRequest? Sort of like how google knows which location I am from just by typing http://www.google.com and then it changes to http://www.google.com.ph
 
Sravan Kumar
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletRequest.getRemoteXXX() methods should help you out.
 
Sravan Kumar
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getLocale() and getLocales() in ServletRequest will give you the accepted locales.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic