How Do I Obtain the Original URL after a redirect?

How Do I Obtain the Original URL after a redirect?

Post by matthew.co » Wed, 18 Mar 2009 02:44:57


Let's say a user enters the URL : www.mydomain.com/firstPage
and then gets redirected to the URL : www.mydomain.com/secondPage.

What I see in my browsers' address window is www.mydomain.com/firstPage.

Is there some say ( maybe in the HTTP Request object) that I can
determine that value of the URL that the user actually entered?

Any insight would be appreciated.

Thanks,
Matt
 
 
 

How Do I Obtain the Original URL after a redirect?

Post by Dave Mille » Wed, 18 Mar 2009 03:17:31


You could setAttribute() on firstPage and read it on secondPage. If you
want something with persistence, you could use cookies.

--
Dave Miller
Java Web Hosting
http://www.yqcomputer.com/

 
 
 

How Do I Obtain the Original URL after a redirect?

Post by Arved Sand » Wed, 18 Mar 2009 09:18:10


It sure doesn't look to me like a redirect anyway. In a redirect the browser
is being told by the server to request a new page, and that new page will
show up in the adddress bar. What you're seeing looks like a forward to me.

AHS