Get last page hit

hi all ! Im trying to get the last page that the user was at in my intranet, how can I do it ? I tried using : String referrer = request.getHeader("referer");

but the thing is that all I get is my app direction, something like http://localhost:8080/Medex/servlet/SvMedex

Any hint is apprecitated.

thanks !

[356 byte] By [juanmanuelsancheza] at [2007-10-3 1:48:44]
# 1

> hi all ! Im trying to get the last page that the user

> was at in my intranet, how can I do it ? I tried

> using : String referrer =

> request.getHeader("referer");

but the thing is

> that all I get is my app direction, something like

> http://localhost:8080/Medex/servlet/SvMedex

>

> Any hint is apprecitated.

>

> thanks !

I'd be inclined to build in a simple screen stack mechanism for just the reason that you've outlined above; referer doesn't give you much.

Depending on your needs you can store as much or as little information about the visitor's path through the application.

If you need a deep, perhaps repeatable path through, you could essentially store a digest of the important request parameters.

If you just needed a "this is where you've been" feature, then just store the screen "names" in the order they've been visited.

For the intranet app I'm currently working on, we have a screen stack mechanism which actually constrains the user's operations by ensuring that they exit a screen in the correct manner (essentially, Save or Cancel) rather than jumping out to arbitrary screens.

marklawforda at 2007-7-14 18:47:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
can you post some of the code, or tell me how do I get the page name? Is there a way to get the file name of the JSP that you are actually opening?THanks!
juanmanuelsancheza at 2007-7-14 18:47:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...