You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lanto Randriamiharisoa <he...@capgemini.com> on 2004/06/02 08:27:17 UTC

How to authenticate under Apache HTTP server and pass information to Tomcat ?

Hi all,

I have a little question about using mod_jk2 with Tomcat (4.1.30) and 
the Apache Http Server (2.0.29)
My Tomcat Webapp requires user authentication for retrievie some 
information (a servlet needs to know the user name logged on), this 
authentication must be done on the Apache HTTP Server. So to do this, 
I've added the following in the httpd.conf :

<Location /sitools>
    AllowOverride AuthConfig
    AuthType Basic
    AuthName "Your username"
    AuthUserFile "E:/Program Files/Apache Group/Apache2/passwd/passwords"
    AuthGroupFile "E:/Program Files/Apache Group/Apache2/passwd/groups"
    Require group students
</Location>

So since now, the authentication is served by Apache, and it's only 
after this process that my servlet is called

I've commented all directives about user authentication in the web.xml 
(such as <security-constraint> , <login-config> and <security-role>)
And, of course... :-/, I encountered some problems : my servlet is 
unable to retrieve the username.
How can I do to pass the authentication information collected by Apache 
Server to my servlet (or Tomcat) ?

Thanks a lot, 

--
Lanto



Our name has changed.  Please update your address book to the following format: "recipient@capgemini.com".

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org