servlet redirect

Discussion in 'Java' started by Bob, May 23, 2006.

  1. Bob

    Bob Guest

    when you use a redirect in a servlet is there some way to get the address of
    the page it redirected from.
     
    Bob, May 23, 2006
    #1
    1. Advertising

  2. Bob

    SMC Guest

    On Tue, 23 May 2006 11:57:45 +1000, Bob wrote:

    > when you use a redirect in a servlet is there some way to get the address of
    > the page it redirected from.


    You could check the Referer header:

    request.getHeader("Referer")

    --
    Sean
     
    SMC, May 23, 2006
    #2
    1. Advertising

  3. Bob

    Oliver Wong Guest

    "SMC" <> wrote in message
    news:p...
    > On Tue, 23 May 2006 11:57:45 +1000, Bob wrote:
    >
    >> when you use a redirect in a servlet is there some way to get the address
    >> of
    >> the page it redirected from.

    >
    > You could check the Referer header:
    >
    > request.getHeader("Referer")


    Note though that this info comes from the client, who can lie to you. So
    don't count on it for security purposes; only use it to provide a convenient
    but non-critical feature to the user.

    - Oliver
     
    Oliver Wong, May 24, 2006
    #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. Andy Fish
    Replies:
    4
    Views:
    2,423
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,900
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    2,018
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,876
  5. Sal
    Replies:
    1
    Views:
    556
Loading...

Share This Page