> Carlos wrote:
> > 
> > can any body say me how can i in a JSP page detect which is 
> the referer
> > page? from which page comes the visit?
> > thanks
> > Carlos
> > 
> > 
> 
> you can try this
> 
> <%
>   String referer=request.getHeader("referer");
>   session.setAttribute("referer",referer);
> %>
> 
> it works fine to me
> 

In addition to this first line of code instead of setting
a session value(since the referer typically changes for each
request) you could have a static system stack(implemented
from a List or whatever you prefer of course) on which you
can push, and pop, elements as needed essentially creating
a history object.  The advantage of this is you can peek at
the top object and see if it's the same as the current
referer and not push if it is.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:[EMAIL PROTECTED]

- Punisher of those who cannot spell dumb!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to