----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Andras Balogh wrote:

> Hi David,
> 
> You can try to set the Authentication header from the LoginServlet with
> 
> response.setHeader("Authorization","Basic usernameandpasswbase64encoded");
> 
> where usernameandpasswbase64encoded should be the
> 'username:password'   ( : is needed ) encoded with Base64 algoritm.
> username and passwords should be a valid user and pwd wich You can access
> the protected
> files with .htaccess.
> Mybe a realm setting is involved too.
> 
>  NOTE: i have never tried this out only reverse:
>  reading Authorization header and decoding with the sun.misc.Base64Decoder
> class.
> SO MAYBE WHAT I AM SAYING IS NOT TRUE :)
> 
> Check for a Base64encoder algoritm on the Internet, You will find one.
> If NOT  send me an e-mail and i will send you one.
> 
> p.s. If you don't understand something feel free to contact me.
> 


I have been asking for something like that some time ago. I got get
recommendation 
to use a special authorization module for apache like cookie_auth. THe
servlet would 
set a cookie which the apache server will then authenticate on.
After getting so far, the need to authorize plain HTML-pages disapeared
an so 
i did not even test it.

If the solution you propose works, i would like to know how.

Stefan


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to