Annu Singh wrote:
> HI Everyone,
>
> I have been trying to get a remote user id in a servlet I have
> written. I am using the "getRemoteUser()" function but it returns a null. I
> was told to configure my Web server to allow user authentication. I tried
> doing it but have not been successful in doing so, as after making the
> changes mentioned in various docs - I still get a "null" value. (I have
> tried using ".htaccess" file, htpasswd command, security.authentication
> directive etc ... but did not work for me).
>
The ".htaccess" file approach will not work. When you are using servlets,
there is no actual directory that is being accessed when you make a request,
so there is no place to put the .htaccess file.
> Has anyone faced this before ? If yes then please do let me know.
>
> I am using
> Apache 1.3.6, with Apache JServ 1.0b5
> JSDK 2.0
> jdk 1.2
> Solaris 7
>
With Apache, you configure access control for servlets using the <Location>
directive in the httpd.conf file -- something like:
<Location /servlet/snoop>
AuthType basic
AuthName Protected Servlet Area
AuthUserFile /your/userfile
AuthGroupFile /your/groupfile
require valid-user
</Location>
You can use any of the authentication mechanisms that Apache supports.
>
> Secondly, is there a mailing list for users of "Apache web server" ?
>
For Apache JServ, go to http://java.apache.org and subscribe to the Apache
JServ Users list ([EMAIL PROTECTED]).
You will also find a wealth of information in the FAQ-O-MATIC at the
java.apache.org site.
>
> TIA,
> Annu Singh
>
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html