I need to integrate a Java web app running under Tomcat 7 with a php app running under Apache Web server on the same machine. Specifically, the php app is responsible for user logins/security and I need my web app to be able to read the _SERVER variable named "REMOTE_USER" stored by php. I do not need to write to the php app or interact in any way other than reading the contents of that variable. If any one has experience doing something similar I would appreciate some tips how to accomplish this.
Joined: Jun 04, 2010
Found the answer. It turns out that selected CGI variables (including REMOTE_USER) are available via the HttpServletRequest. In this case, there is a method (getRemoteUser()) that returns the value populated by Apache.