views:

21

answers:

1

I am working on building a learners website (http:localhost:8080.xyz.com).This is being built on glassfish server using gwt.I need to integrate forums(http:localhost:8888.abc.com)into this site .The forum is built using php and is on Apache Server.

Both the websites share the same MySQL database and this database has a table named session table which has information about the user id and corresponding session id.

Now i am trying to integrate the forum into my website using an Iframe.

My first question here is,once the user logins into my website will my website and the iframe have the same session id?

If they dont have the same session id what would be the best way to implement the functionality that when user logins into my system he is also automatically logged in into the forum?

Thanks

A: 

Easy Solution:

Send the user (via iframe or ajax or whatever) to a page on domain B, providing the session ID as a get parameter (http:localhost:8888.abc.com/sso.php?sessid=the_sess_id), then create the cookie on domain B.

More complicated solution:

Setup one of the two servers as a reverse proxy so both apps share the same domain and cookies.

David L.-Pratte

related questions