tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lanto Randriamiharisoa <>
Subject How to authenticate under Apache HTTP server and pass information to Tomcat ?
Date Wed, 02 Jun 2004 06:27:17 GMT

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

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, 


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

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:
For additional commands, e-mail:

View raw message