Creating basic auth header manually

S

Steve

To make a very long story short, I have a need of creating a basic auth
header in a JSP (through code, not through normal browser-server
interaction), and then moving on to another page which expects to see
that authorization header.

Building the header value, and setting it on the response object, have
been no big deal. However, the second step of moving on the next page
has been a pain. A basic response.sendRedirect() does not seem to pass
the auth header along, and a Google search leads me to believe that a
forward must be used rather than a redirect to accomplish what I'm
wanting to do. However I've tried using a forward, both through a
RequestDispatcher object as well as a <jsp:forward> directive, and this
doesn't seem to be passing across the header value either.

Is there something obvios that I'm missing here? Thanks in advance!
 

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,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top