How to create a single login for multiple apps on tomcat server?

Hello,

I am running the most recent versions of apache and tomcat on several dells with XP pro.

When I login to an app I have created, a session variable is set, but when I browse to one of the other apps on the same computer, it does not recognize that the session variable has been set and I have to login again.

Can somebody please suggest how, or where I can find docs, to configure tomcat to pass the session variables to other apps?

Thank you very much.

Or, can anybody suggest the most effective strategy for creating single-logon functionality for multiple apps with tomcat and apache running on one computer? and with tomcat and apache running on multiple computers? (i.e., each computer has tomcat and apache integrated).

The database is Oracle 10g running on each computer.

Thank you again.

[850 byte] By [loganscotta] at [2007-10-2 17:40:26]
# 1
The concept you're describing is known as "Single Sign-On". It can be fairly involved. A Google search on "single sign on" gives a lot of possible solutions.I'd start with Tomcat's single sign-on Valve http://tomcat.apache.org/tomcat-5.0-doc/config/host.html#Single%20Sign%20On
Gerald.Hanwecka at 2007-7-13 18:57:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks.Is it possible to submit a form to a page in another application and pass hidden variables of this type?:<input type=hidden name=logincheck value=1>
loganscotta at 2007-7-13 18:57:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html

Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.

"Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:

hidden=1&submit=ok

(Of course, the variable names would depend on what the web server was expecting from the form.)

Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

Gerald.Hanwecka at 2007-7-13 18:57:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
This is great help. Thank you.
loganscotta at 2007-7-13 18:57:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...