How can i change JSESSIONIDSSO cookie name?
Hi Guys, I have JSESSIONIDSSO cookie related problem. Currently I'm running two web applications in the same machine, but using two different tomcat servers. Both the applications has the same context path, but port numbers are different. I've enabled single sign on feature in in one of the tomcat's application. It is using JSESSIONIDSSO cookie for this feature. If i logged into one of the application, another one get logged out. It happens due to same JSESSIONIDSSO cookie name. To avoid this issue, i want to change JSESSIONIDSSO cookie name in one of the application. So i can avoid this name conflict. I know, i can change JSESSIONID name. Is it possible to change JSESSIONIDSSO name? Any other way to solve this problem? Note: If i change context path of the both the application, It will work. But unfortunately, i can't change. Both the applications are running in same context path but in different ports. Regards, Mathan Karthik R
Why we have duplicate JSESSIONIDSSO cookies ?
Why tomcat maintaining duplicate JSESSIONIDSSO cookies for the same hostname and context path? Is it a bug? Due to this, i have problem in single sign on. Regards, Mathan Karthik R
Re: How can i change JSESSIONIDSSO cookie name?
Hi Mark Thanks for your swift response. Sorry i missed to mention my tomcat version. One of my application using tomcat_6_0_28 and another application using tomcat_5_0_28. I have added org.apache.catalina.SSO_SESSION_COOKIE_NAME and org.apache.catalina.SESSION_COOKIE_NAME. Now my JSESSIONID cookie name got changed. But JSESSIONIDSSO name didn't get changed. Am i missing anything? Regards, Mathan Karthik R On Sat, 16 Jul 2011 01:05:27 +0530 Mark Eggers<its_toas...@yahoo.com> wrote - Original Message - > From: Mathan Karthik <mathankarthi...@manageengine.com> > To: users@tomcat.apache.org > Cc: > Sent: Friday, July 15, 2011 5:08 AM > Subject: How can i change JSESSIONIDSSO cookie name? > > Hi Guys, > > I have JSESSIONIDSSO cookie related problem. > > Currently I'm running two web applications in the same machine, but using > two different tomcat servers. Both the applications has the same context path, > but port numbers are different. > > I've enabled single sign on feature in in one of the tomcat's > application. It is using JSESSIONIDSSO cookie for this feature. > > > If i logged into one of the application, another one get logged out. It happens > due to same JSESSIONIDSSO cookie name. To avoid this issue, i want to change > JSESSIONIDSSO cookie name in one of the application. So i can avoid this name > conflict. > > > I know, i can change JSESSIONID name. Is it possible to change JSESSIONIDSSO > name? Any other way to solve this problem? > > > Note: If i change context path of the both the application, It will work. But > unfortunately, i can't change. Both the applications are running in same > context path but in different ports. > > > Regards, > Mathan Karthik R > Better, but we still have no idea what version, system, etc. However, a quick search in the documentation shows: http://tomcat.apache.org/tomcat-5.5-doc/config/systemprops.html#Sessions http://tomcat.apache.org/tomcat-6.0-doc/config/systemprops.html#Sessions http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html#Sessions /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How can i change JSESSIONIDSSO cookie name?
Hi Mark Thanks for the response. I have added org.apache.catalina.authenticator.Constants.SSO_SESSION_COOKIE_NAME and org.apache.catalina.SSO_SESSION_COOKIE_NAME in system properties. Gave the same cookie name for the both system properties. Now Its working. Is it mandatory to keep both the entries? Please advice. Regards, Mathan Karthik R On Sat, 16 Jul 2011 02:48:50 +0530 Mark Eggers<its_toas...@yahoo.com> wrote - Original Message - > From: Mathan Karthik <mathankarthi...@manageengine.com> > To: Tomcat Users List <users@tomcat.apache.org> > Cc: > Sent: Friday, July 15, 2011 1:30 PM > Subject: Re: How can i change JSESSIONIDSSO cookie name? > > Hi Mark > > Thanks for your swift response. Sorry i missed to mention my tomcat version. One > of my application using tomcat_6_0_28 and another application using > tomcat_5_0_28. > > I have added org.apache.catalina.SSO_SESSION_COOKIE_NAME and > org.apache.catalina.SESSION_COOKIE_NAME. Now my JSESSIONID cookie name got > changed. But JSESSIONIDSSO name didn't get changed. Am i missing anything? > > > Regards, > Mathan Karthik R A quick look at the docs (and javadocs) seems to indicate that this is not possible for 5.0.x. All interesting fields are public static final String. Time to upgrade. For 6.0.28, why did you change both? I was under the impression that you only wanted the SSO cookie name changed. >From the the documentation: org.apache.catalina.SESSION_COOKIE_NAME Note that the Servlet specification requires this to be JSESSIONID. You should not rely on being able to change this. How did you set the system property? Did you read this? http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q29 In particular, it's a good idea to create a setenv.sh file in $CATALINA_HOME/bin (or $CATALINA_BASE/bin if you're running several Tomcats from a base installation) and add the appropriate setting to CATALINA_OPTS. Something like: #!/bin/bash CATALINA_OPTS="-Dorg.apache.catalina.SSO_SESSION_COOKIE_NAME=JNONSTANDARDSSO" export CATALINA_OPTS might work. This is based on my reading of the documentation. I've not tried this. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How can i change JSESSIONIDSSO cookie name?
It has been verified, we have to set only org.apache.catalina.authenticator.Constants.SSO_SESSION_COOKIE_NAME in system properties. No need to set org.apache.catalina.SSO_SESSION_COOKIE_NAME. Apache Tomcat Configuration Reference - System Properties document has to be modified. It has been reported as a bug. Hope they will make the necessary changes in document. Thanks a lot. Regards, Mathan Karthik R ZOHO Development Center(India) Pvt Ltd On Sat, 16 Jul 2011 22:34:59 +0530 Mark Eggers<its_toas...@yahoo.com> wrote - Original Message - > From: Mathan Karthik <mathankarthi...@manageengine.com> > To: Tomcat Users List <users@tomcat.apache.org> > Cc: > Sent: Saturday, July 16, 2011 12:49 AM > Subject: Re: How can i change JSESSIONIDSSO cookie name? > > Hi Mark > > Thanks for the response. > > > I have added org.apache.catalina.authenticator.Constants.SSO_SESSION_COOKIE_NAME > and org.apache.catalina.SSO_SESSION_COOKIE_NAME in system properties. Gave the > same cookie name for the both system properties. Now Its working. > > > Is it mandatory to keep both the entries? Please advice. > > > Regards, > Mathan Karthik R > Glad it now works. Also, it's good that you've reported how it works. The next time someone comes up with this problem, hopefully they'll search the mail list archives and get the question answered a lot easier (and faster). As to what's required, I suggest that you experiment and find out what works. Or you could read the documentation, including the API available for download as apache-tomcat-version-fulldocs.tar.gz. I've never changed the JSESSIONID or JSESSIONIDSSO names, since I've never had a requirement that could be met by doing so. All I did was read the documentation, which is probably a good suggestion. If you find the documentation difficult to follow write a Wiki entry or propose a documentation patch and attach it to a bugzilla enhancement request. I've seen both suggested several times on the list. . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org