Redirecting to another application with Authorization Header

Discussion in 'Java' started by Brian McPheeters, Jul 8, 2003.

  1. I need to create a jsp page that sends the browser to another jsp page
    in a separate web application with authorization information. Here is
    what I have tried to do already.

    response.setHeader("Authorization","BASIC " +
    b64Encode(user+":"+pass));
    response.sendRedirect(response.encodeURL("/newJob/mypage.jsp"));

    In mypage.jsp in the newJob application I try to grab the
    Authorization header from the request object but it always comes back
    as null. Upon further investigation I see that sendRedirect does not
    send the additional headers that are set in the response object but
    just sends the redirect header back to the browser.

    Does anyone know of a way to do this? I don't want the user to have to
    login to multiple times.

    Brian McPheeters
     
    Brian McPheeters, Jul 8, 2003
    #1
    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. Shaun Wilde

    Authorization HTML Header going missing

    Shaun Wilde, Nov 18, 2004, in forum: ASP .Net
    Replies:
    15
    Views:
    1,124
    Steven Cheng[MSFT]
    Dec 8, 2004
  2. Newsgroup - Ann
    Replies:
    4
    Views:
    716
    lilburne
    Nov 2, 2003
  3. mlt
    Replies:
    2
    Views:
    853
    Jean-Marc Bourguet
    Jan 31, 2009
  4. pallavi07
    Replies:
    0
    Views:
    1,081
    pallavi07
    Apr 15, 2009
  5. SeanRW
    Replies:
    1
    Views:
    367
    Dominick Baier [DevelopMentor]
    May 25, 2006
Loading...

Share This Page