Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Creating basic auth header manually

Thread Tools

Creating basic auth header manually

Posts: n/a
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!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to fetch Basic Auth header in Mason Steve Perl Misc 0 04-22-2008 08:01 PM
Setting the encoding in the basic auth header Python 3 06-12-2007 06:49 AM
Windows Auth, but Forms Auth for one page? =?Utf-8?B?ZGhucml2ZXJzaWRl?= ASP .Net 1 01-08-2005 05:50 PM
Configuring Windows Auth & Forms Auth in Asp.Net =?Utf-8?B?Q2hyaXMgTW9oYW4=?= ASP .Net 0 04-28-2004 06:11 PM
container-auth vs servlet-auth role-checking? Mark Chai Java 1 10-01-2003 06:30 PM