In this case, why not simply use (mini test jsp):

User: <%=request.getRemoteUser()%>

:)

Honestly: mod_jk forwards quote some information apache has to tomcat, because mod_jk knows it's a reverse proxy situation. Besides the SSL info mentioned on the apache page of mod_jk reference guide, there is auth_type and remote_user. remote_user maps to request.getRemoteUser() in the servlet API.

Of course you can extend this by forwarding arbitrary apache environment variables via JkEnv to get them as request attributes on the tomcat side, but for the remote_user this should be not necessary.

I  hope this works for you (Peter).

Regards,

Rainer


Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter,

Peter Neu wrote:
I'm doing user authentication on the apache server and forward then to
tomcat. I know this is not the best way but I can't change it for now. :o(

Until recently that was all but now I need to pass the user name to the
tomcat server as well. Is there any way to do this?

You're looking for JkEnvVar. Check out the "Java/Tomcat/mod_jk
Integration" section on this page (or just search for JkEnvVar):

http://webauth.stanford.edu/manual/mod/mod_webauth.html

This page is documentation for mod_webauth, but their config example
should be appropriate for any type of auth module.

To any mod_jk authors reading this, it might be helpful to flesh-out the
description and examples for the use of JkEnvVar on
http://tomcat.apache.org/connectors-doc/reference/apache.html. Maybe
just another example (plus how to get that information from the request
on the Java side) would be helpful.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJ4Lu9CaO5/Lv0PARApKtAJwOsFZnr5SZ6KWAaCYCR8PGw4JQRgCfQJ0k
n3Z2oSPLeOu5RgrpubmMmIQ=
=fde5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to