By the way - the effect is identical with both TC 4.1.29 and 5.0.18. Regards, Morten Sabroe Mortensen
-----Original Message----- From: Morten S. Mortensen Sent: 9. februar 2004 13:06 To: [EMAIL PROTECTED] Subject: Deployment through Ant causes loss of session-control When I deploy a WAR-file through Ant, I lose cookie-session-control in IE and Mozilla, but not Opera!!! I have looked at a lot of stuff and finally come to the conclusion, that if I deploy the exact same file with the tomcat-manager interface at e.g. http://localhost:8080//manager/html/, session-control is perfect, because suddenly the sessions-id is fixed and "request.isRequestedSessionIdFromCookie()" returns true. The "<context>"-elements for the two ways to deploy the WAR are *nearly* identical in the two cases, because in the failing case "docBase" and "path" contains a space: <Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="false" debug="0" docBase="C:\Program Files\Apache Group\Tomcat\4.1.29\webapps\Something XXX" mapperClass="org.apache.catalina.core.StandardContextMapper" path="/Something XXX" privileged="false" reloadable="false" swallowOutput="false" useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper"> </Context> Since my stripped down test-WAR is "Something.war", it does not happen with a manual deploy through the manager. If I remove " XXX" from the two instances of "Something XXX", then session-control is operational!!! I have no idea why Opera differs from IE and Mozilla. I have not seen, what Tomcat returns in its HTTP-replies, but opera sends in its second request a cookie - JSESSIONID Name: JSESSIONID Value: 6BED2E22402090337A37B624CB6BDF3A Domain: null Path: null Comment: null Version: 0 Maximum age: -1 - with no domain, path or anything. This thing with spaces in "docBase"/"path" and loss of session-control - is this a known problem? It is quite natural to put spaces in there. Regards, Morten Sabroe Mortensen ----- <property name="external.tomcat.catalina.classpath.dir" value="${krapyl.lib.dir}/Tomcat/4.1.29/Catalina" /> <property name="external.tomcat.catalina.classpath" value="${external.tomcat.catalina.classpath.dir}/catalina-ant.jar" /> <target name="external.tomcat.catalina.init" > <taskdef name="tomcat-deploy" classname="org.apache.catalina.ant.DeployTask" classpath="${external.tomcat.catalina.classpath}" /> ... </target> <target name="external.tomcat.catalina.deploy" depends=" external.tomcat.catalina.init, build " > <tomcat-deploy url="${external.tomcat.manager.URL}" username="${external.tomcat.manager.username}" password="${external.tomcat.manager.password}" path="${external.tomcat.app.path}" war="${external.tomcat.WAR.file.URL}"/> <echo>Deployed "${external.tomcat.app.path}".</echo> </target> ----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]