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 !
> 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.