Redirecting to another application with Authorization Header

  • Thread starter Brian McPheeters
  • Start date
B

Brian McPheeters

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top