File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 10246
    
    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: 10246
    
    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: 10246
    
    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|
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to know the last visited user in webpage