You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by teh j <to...@yahoo.com.au> on 2001/04/15 12:57:13 UTC

obtaining the url

Hi guys

Just wondering if there is a way for a JSP to get the
URL of the web page that it was accessed by?
EG say you are at page2.jsp and u got here by clicking
on a link at page1.jsp, is there a way to retrieve the
fact that you arrived at page2.jsp by clicking from
page1.jsp?

Jason

_____________________________________________________________________________
http://movies.yahoo.com.au - Yahoo! Movies
- Now showing: Dude Where's My Car, The Wedding Planner, Traffic..

RE: obtaining the url

Posted by Danny Angus <da...@thought.co.uk>.
its the http_referrer environment variable, available as a request attribute
I think..

> -----Original Message-----
> From: teh j [mailto:tomcat_list2000@yahoo.com.au]
> Sent: Sunday, April 15, 2001 11:57 AM
> To: tomcat-user@jakarta.apache.org
> Subject: obtaining the url
>
>
> Hi guys
>
> Just wondering if there is a way for a JSP to get the
> URL of the web page that it was accessed by?
> EG say you are at page2.jsp and u got here by clicking
> on a link at page1.jsp, is there a way to retrieve the
> fact that you arrived at page2.jsp by clicking from
> page1.jsp?
>
> Jason
>
> __________________________________________________________________
> ___________
> http://movies.yahoo.com.au - Yahoo! Movies
> - Now showing: Dude Where's My Car, The Wedding Planner, Traffic..


Re: obtaining the url

Posted by Milt Epstein <me...@uiuc.edu>.
On Sun, 15 Apr 2001, teh j wrote:

> Hi guys
>
> Just wondering if there is a way for a JSP to get the
> URL of the web page that it was accessed by?
> EG say you are at page2.jsp and u got here by clicking
> on a link at page1.jsp, is there a way to retrieve the
> fact that you arrived at page2.jsp by clicking from
> page1.jsp?

Try getting the referer header (not sure of exact spelling or
capitalization).

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu