You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jason Watts <co...@stuff.to> on 2004/05/29 21:35:11 UTC

having session problems with two cocoon contexts in tomcat

cocoon: 2.1.3
tomcat: 5.0.18

The problem: I had one web context (webapps/app) setup using cocoon. Everything is fine. The context requires user validation (via basic authentication) and the context can only be accessed via https. This context does use sessions.

We decided to use cocoon for our main page also (context is webapps/ROOT). so what i did was copy the app subdirectory to ROOT, and modified accordingly. The ROOT context didn't need to be authenticated and does not require any kind of login. This context also uses sessions.

Individually, they work great. Open a new browser window, only go to one or the other and everything works. Session tracking behaves correctly. But what I needed was to go to the ROOT page, go to a login page, and have a link to the app context. When I click on the link, it takes me to the app context, BUT, every time a new page loads from the app context, it has a NEW session. But when i log out of my app context and am directed back to the ROOT context, the original session i had in the ROOT context is still there and doesnt' change.

What i would really like is to have one session between both contexts. But i can live with two seperate sessions if need be. I can't have a new session for every page load in the app context. PLEASE HELP if you know why?!?!?!?!?!?

What the problem seems to be to me (and I could be very wrong) is that cocoon sees the cookie for the ROOT session when I go to the apps context, but it ignores it and creates a new session. Then when you go to a new page it looks for the session cookie. It seems to find that original session cookie, decides again that it won't use it and creates another session instead of looking for another session cookie. ???? I dont' know, just taking a guess.

If you need me to supply any more information, please let me know.

Thank you very much for your time/input!
Jason