You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carlos <li...@lpis.com> on 2001/03/01 13:29:25 UTC

referer

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


Re: referer

Posted by Alex Fernández <af...@tid.es>.
Hi.

Your question would be better answered in a general servlet list, since it
has nothing to do with Tomcat specifically.

Anyway, I think that
request.getHeader ("Referer")
will do it.

Un saludo,

Alex.

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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org


Re: referer

Posted by paxson yang <pa...@ninecom.com>.
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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org

you can try this

<%
  String referer=request.getHeader("referer");
  session.setAttribute("referer",referer);
%>

it works fine to me