This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to know the last visited  user in webpage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to know the last visited  user in webpage" Watch "How to know the last visited  user in webpage" New topic
Author

How to know the last visited user in webpage

Thameem Aliyar
Ranch Hand

Joined: Oct 11, 2011
Posts: 42
How can i access the details of last webpage accessed user.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

Your question is confusing.

1) For a given webpage, do you want to find the last user who accessed the said page?
OR
2) For a given user, do you want to find the last web page the said user accessed.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Thameem Aliyar
Ranch Hand

Joined: Oct 11, 2011
Posts: 42
For a given webpage, I want to find the last user who accessed the said page?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

So what defines a user for you? Name? IP Address?
Thameem Aliyar
Ranch Hand

Joined: Oct 11, 2011
Posts: 42
Name...
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

So what are you using for identifying users?
Thameem Aliyar
Ranch Hand

Joined: Oct 11, 2011
Posts: 42
sessions..................
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Then it looks like you need to maintain a table which keeps a track of the pages and the timestamps when they are accessed.
Write a filter (or something similar) that controls the page access and pull user data ( specifically the name of the user) and update the table before displaying the page.

Hope this helps


SCJP, SCWCD.
|Asking Good Questions|
 
Consider Paul's rocket mass heater.
 
subject: How to know the last visited user in webpage
 
Similar Threads
Applets and Hyperlinks
need to manage sigle session for same user in differnt browser
default page
servlets/JSP
open a webpage from a java application