From: Jost B. <jos...@ya...> - 2005-11-27 19:54:51
|
Hi Michet, [please excuse the delay] > I am trying to share sessions between php and java. > > Now I would like my php repository to be independent > from the tomcat repository. Do you use the mod_jk adapter (see "Example#1: Apache/IIS/mod_jk connector" in the NEWS) or do you share the http server document root with the servlet engine's webapps directory (see Example#2 "Example: a shared document directory" in NEWS)? (-> http://php-java-bridge.sourceforge.net/NEWS) > I pass elements in the session from php to java and > it works fine. Depending on your setup the cookie PATH is "/", which is okay for a single-user setup. > But when I return to the php I loose my elements. If you check your cookies you'll probably see two cookies, one with PATH=/JavaBridge and one with PATH=/. Or you'll see only one cookie with PATH=/. Which means that you cannot access the /JavaBridge cookie anymore. This behaviour is intentional: In a multi-user setup script userA/sessionSharing.php should not be able to share the session values with script userB/sessionSharing.php. If you don't care about the PATH, I suggest to install the JavaBridge.war without a context (i.e. as context "/"). After that you need to change the java.servlet setting from "/JavaBridge/PhpJavaServlet" to: java.servlet = "/PhpJavaServlet" > When I look at the cookie (JsessionID) I have the > same cookie from php to java. Yes, but what about the PATH? Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |