Fórum
Allow configuration of sessionid value
Bijan Vakili, modificado 12 Anos atrás.
Allow configuration of sessionid value
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens Recentes
Hi,
Liferay uses default "jsessionid" instead of value of configurable property "org.apache.catalina.SESSION_COOKIE_NAME" for the session id cookie. I've created following LPS to fix this so that Liferay uses the configuration as opposed to hardcoded value:
http://issues.liferay.com/browse/LPS-23475
One simple solution that has worked so far for me is to simply change com.liferay.portal.util.CookieKeys.JSESSIONID = "jsessionid" to following:
However, there are a couple other files that have "jsessionid" hardcoded value. For example:
com.liferay.portal.servlet.filters.session.SessionIdServletRequest._JSESSIONID = "JSESSIONID";
and
com.liferay.portal.util.PortalImpl._JSESSIONID = ";jsessionid=";
and
/html/js/liferay/util.js
What do you think is the best way to patch these files to use the configuration property System.getProperty("org.apache.catalina.SESSION_COOKIE_NAME", "jsessionid");?
Thanks.
Bijan
Liferay uses default "jsessionid" instead of value of configurable property "org.apache.catalina.SESSION_COOKIE_NAME" for the session id cookie. I've created following LPS to fix this so that Liferay uses the configuration as opposed to hardcoded value:
http://issues.liferay.com/browse/LPS-23475
One simple solution that has worked so far for me is to simply change com.liferay.portal.util.CookieKeys.JSESSIONID = "jsessionid" to following:
public static final String JSESSIONID =
System.getProperty(
"org.apache.catalina.SESSION_COOKIE_NAME", "jsessionid");
However, there are a couple other files that have "jsessionid" hardcoded value. For example:
com.liferay.portal.servlet.filters.session.SessionIdServletRequest._JSESSIONID = "JSESSIONID";
and
com.liferay.portal.util.PortalImpl._JSESSIONID = ";jsessionid=";
and
/html/js/liferay/util.js
What do you think is the best way to patch these files to use the configuration property System.getProperty("org.apache.catalina.SESSION_COOKIE_NAME", "jsessionid");?
Thanks.
Bijan
Sandeep Nair, modificado 12 Anos atrás.
RE: Allow configuration of sessionid value
Liferay Legend Postagens: 1744 Data de Entrada: 06/11/08 Postagens Recentes
Will this be available in Glassfish, websphere, weblogic or is it just Tomcat specific
Regards,
Sandeep
Regards,
Sandeep
Bijan Vakili, modificado 12 Anos atrás.
RE: Allow configuration of sessionid value
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens Recentes
Sandeep,
All should be supported. You make a good point because my suggestion only works for Tomcat. Servlet Spec 3.0 seems to provide the SessionCookieConfig class :
http://docs.oracle.com/javaee/6/api/javax/servlet/SessionCookieConfig.html
In that case, I hope Liferay utilizes the configuration provided by Servlet Spec to properly allow configuration of session tracking cookie.
Thanks.
All should be supported. You make a good point because my suggestion only works for Tomcat. Servlet Spec 3.0 seems to provide the SessionCookieConfig class :
http://docs.oracle.com/javaee/6/api/javax/servlet/SessionCookieConfig.html
In that case, I hope Liferay utilizes the configuration provided by Servlet Spec to properly allow configuration of session tracking cookie.
Thanks.
Mika Koivisto, modificado 12 Anos atrás.
RE: Allow configuration of sessionid value
Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
Liferay still has to work with Servlet spec 2.3 so I don't see us adding that until ALL the appserver versions we support are Servlet spec 3.0 compliant.
Bijan Vakili, modificado 12 Anos atrás.
RE: Allow configuration of sessionid value
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens Recentes
Hi Mika,
It makes sense for Liferay to postpone action on this until all the App Servers upgrade to 3.0. In the meanwhile, anyone who wants to can simply create an EXT plugin to achieve this as in the original post.
Thanks for your insightful comment.
It makes sense for Liferay to postpone action on this until all the App Servers upgrade to 3.0. In the meanwhile, anyone who wants to can simply create an EXT plugin to achieve this as in the original post.
Thanks for your insightful comment.
Jeff Gorris, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
New Member Mensagem: 1 Data de Entrada: 08/01/15 Postagens Recentes
Has the status of this issue changed?
We would like to be able to configure the sessionid cookie name, among other things.
We are on Liferay 6.1.20.-ee-ga2
We would like to be able to configure the sessionid cookie name, among other things.
We are on Liferay 6.1.20.-ee-ga2
Bijan Vakili, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens Recentes
Hi Jeff, per Mika's answer, I guess not:
Since compatibility matrix shows:
For Liferay Portal 6.1 EE, that WebLogic 10 is supported. However, WebLogic 10 implements Servlet spec 2.5, not spec 3.0, per their documentation:
http://docs.oracle.com/cd/E13222_01/wls/docs100/notes/new.html#wp1065403
The same is true of 6.2 EE; since WebLogic 11g also implements Servlet spec 2.5 (wonder what Oracle was doing between those two releases? I don't know, but I'm guessing it was marketing move.)
Perhaps Liferay 7 brings this feature. For future note, look at below issue:
https://issues.liferay.com/browse/LPS-23475
LPS-23475 tracks this feature request and should reflect latest on this front.
Mika Koivisto:
Liferay still has to work with Servlet spec 2.3 so I don't see us adding that until ALL the appserver versions we support are Servlet spec 3.0 compliant.
Since compatibility matrix shows:
For Liferay Portal 6.1 EE, that WebLogic 10 is supported. However, WebLogic 10 implements Servlet spec 2.5, not spec 3.0, per their documentation:
http://docs.oracle.com/cd/E13222_01/wls/docs100/notes/new.html#wp1065403
The same is true of 6.2 EE; since WebLogic 11g also implements Servlet spec 2.5 (wonder what Oracle was doing between those two releases? I don't know, but I'm guessing it was marketing move.)
Perhaps Liferay 7 brings this feature. For future note, look at below issue:
https://issues.liferay.com/browse/LPS-23475
LPS-23475 tracks this feature request and should reflect latest on this front.
Mika Koivisto, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
Everyone wanting this feature should go vote for the ticket as it currently has zero votes.
Bijan Vakili, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens RecentesMika Koivisto:
Everyone wanting this feature should go vote for the ticket as it currently has zero votes.
Hi Mika, I don't see the vote option (PFA screenshot, no vote button there.)
Thank you for the suggestion anyway.
Olaf Kock, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens RecentesBijan Vakili:
Hi Mika, I don't see the vote option (PFA screenshot, no vote button there.)
I've notified the Jira Admins to check if we have a misconfiguration there. Please try again soon.
Mika Koivisto, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
It might be also that the ticket creator is not allowed to vote for their own issue.
Olaf Kock, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
m(
Ouch, missed that. Embarrassing.
I put in a vote on your behalf.
Ouch, missed that. Embarrassing.
I put in a vote on your behalf.
Bijan Vakili, modificado 9 Anos atrás.
RE: Allow configuration of sessionid value
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens Recentes
Hi Mika, you're absolutely correct. At the time, I thought to check more issues; but by chance all of them were closed (but I didn't pay attention at time); and so I couldn't vote on them either; so I thought I cannot vote there. I see I can vote on open issues right now.
Olaf, thank you for the upvote on this
By the way, I like Radio Liferay; especially now that can listen there (see attached picture for what I my meaning.) In fact, I did same thing for my blog now
Olaf, thank you for the upvote on this
By the way, I like Radio Liferay; especially now that can listen there (see attached picture for what I my meaning.) In fact, I did same thing for my blog now
Anexos: