How Do I Obtain the Original URL after a redirect?

Discussion in 'Java' started by matthew.connors123@gmail.com, Mar 16, 2009.

  1. Guest

    , Mar 16, 2009
    #1
    1. Advertising

  2. Dave Miller Guest

    wrote:
    > 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

    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.cheap-jsp-hosting.com/
     
    Dave Miller, Mar 16, 2009
    #2
    1. Advertising

  3. <> wrote in message
    news:...
    > 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


    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
     
    Arved Sandstrom, Mar 17, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chao
    Replies:
    4
    Views:
    1,940
    Mike Treseler
    Jun 14, 2004
  2. Jon paugh
    Replies:
    1
    Views:
    861
  3. IanR
    Replies:
    2
    Views:
    296
    Albert Hopkins
    Mar 12, 2009
  4. Lee Farrant
    Replies:
    2
    Views:
    174
    Bob Barrows
    Dec 24, 2003
  5. Replies:
    3
    Views:
    136
Loading...

Share This Page