If 'b' is not protected, then Apache will neither ask for 
authorization nor include authorization info in the request
headers when a document in 'b' is requested.

One thing you could try is to use a symbolic link to 'b'
from 'a' so that /htdocs/a/b points to /htdocs/b. Then
a request for /htdocs/a/b will require authorization, but
/htdocs/b will not.  Of course it all depends on how your
documents link to 'b' and if you don't mind maintaining 2 
routes to 'b' in your links.

Jeff

----- Original Message ----- 
From: "Barris, Wes (LI, Uni of Queensland)" <[EMAIL PROTECTED]>
To: "Tomcat User (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 10:37 PM
Subject: Basic authentication and Tomcat servlets


> I am running Tomcat 4.0.1 connected to Apache 1.3.23 via mod_webapp 1.0
> on a Redhat 7.2 system.
> 
> Directory 'a' is protected using Basic Apache authentication:
> 
> /htdocs/a
> 
> Directory 'b' is where my servlets are deployed via webapp:
> 
> /htdocs/b
> 
> I want to allow anyone access to 'b', but inside a servlet in 'b'
> I want to test to see if they authenticated themselves in 'a'.
> Is there a way to do this?
> 
> 
> So far, I have only been able to do this using:
> 
> String auth = request.getHeader("Authorization");
> 
> IFF 'b' is under 'a' like this:
> 
> /htdocs/a/b
> 
> --
> Wes Barris
> E-Mail: [EMAIL PROTECTED]
> Phone: 07-3346-2504
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to