beyaNet wrote:

Upayavira,
thanks for your reply. I'm not sure I quitefollow you as this whole Apache RewriteRule business is new to me. Could you possible give me an example of what you mean?

Sorry for the delay. I missed your message.

Take this:

user goes to www.yoursite.com:80/hello.html
this redirects to www.yoursite.com:8080/cocoon/hello.html

When generating this page, Cocoon creates a session. When the servlet container creates a session, it will create it relative to the server and the _path_, i.e. www.yoursite.com and /cocoon. This is passed back to Apache, which returns a page to them with the url www.yoursite.com:80/hello.html, and a cookie for the path /cocoon.

When they then click on the link to www.yoursite.com:80/another.html, the browser says to itself, "Do I have any cookies for this path?", to which the answer is 'no', as the /cocoon cookie isn't relevant. But it should have been. It is your session cookie. Hence, when generating the another.html page, Cocoon will create a new session for it.

The solution is to have Apache and Cocoon/servlet container use the same directory nesting, e.g:

http://www.yoursite.com:80/hello.html --> http://www.yoursite.com:8080/hello.html

That's it really.

Now say you want to have:

http://www.myfirstsite.com:80/hello.html -> http://www.myfirstsite.com:8080/first/hello.html
http://www.mysecondsite.com:80/hello.html -> http://www.mysecondsite.com:8080/second/hello.html


You should switch that to:

http://www.myfirstsite.com:80/hello.html -> http://www.myfirstsite.com:8080/hello.html
http://www.mysecondsite.com:80/hello.html -> http://www.mysecondsite.com:8080/hello.html


and have either your servlet container mount different webapps based upon the hostname, or have Cocoon use the HostMatcher to mount different sitemaps based upon hostname.

Make sense now?

Regards, Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to