Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

detect the last IP address that accesses a page  RSS feed

 
Rudy Rusli
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm providing a JSP page to our clients.

In order to provide better control, I'm trying to find a way to detect the last IP address that accesses the page. Is there anyway I could do this using JSP?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every web server/container I've ever known supports access logging.
If you want to get the IP from within your application, look at the methods in HttpServletRequest.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletRequest.html#getRemoteAddr()
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!