I believe you need a Location directive in httpd.conf.  You 
would have something like:

<Location /mywebapp>
   AuthName "myauth"
   AuthType Basic
   AuthUserFile /path/to/myauthfile
   require valid-user
</Location>

Of course, replace mywebapp as appropriate.  Sounds like you 
may want to protect just one servlet in your app.  If so, adjust the 
Location appropriately.  Just keep in mind that location deals with 
the url path, not the real path on your file system.

Best Regards,

Jason Koeninger
J&J Computer Consulting
http://www.jjcc.com



On Tue, 19 Jun 2001 10:20:52 -0400, Harold Arando wrote:

>Hi, every body
>
>I have the following problem:
>
>I would like protect a servlet with AuthType Basic, for apache display the dialog 
>"login/pass".
>
>my directory where is my servlet is:
>
>C:/tomcat/webapps/defe/Web-inf/classes/defe/AdministrationServlet.class
>
>the file:  AdministrationServlet.class is the servlet that I would like protect.
>
>my directory where is the file htttp.conf is: 
>
>C:/apache/conf/httpd.conf
>
>what I must put in the file http.conf to protect the servlet 
>AdministrationServlet.class
>
>thanks in advance...
>
>I use apache Version 1.3 and tomcat 3.2.1 please help me....
>
>atte. harold arando
>



Reply via email to