Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nick Lindberg
Liferay Initial P age Load: "jsessionid" causing links to redirect
April 19, 2012 7:14 AM
Answer

Nick Lindberg

Rank: Junior Member

Posts: 28

Join Date: January 5, 2012

Recent Posts

Hello,

So-- this problem just started happening (or maybe it was happening all along and I didn't notice it after the first time) but, here is what is happening:

When somebody loads our page for the first time, all the links are appended with:

;jsessionid=8D183E4EECA2028C1CF9C4D09E96DE2A

and what seems to happen is that when you click on it, it just redirects you back to the same page [our homepage] only those "jsessionid" strings are now gone and everything works as normal.

Here is a tinyurl to our page. (It you want to validate my identity, you can see that this isn't my first post.)

http://tinyurl.com/83f74rq

(Disclaimer: If you are thinking "wow, that looks alot like the Liferay page!" then you are 100% right... I'm not a web programmer and had to figure out how this stuff works in a little under 2 weeks, so it was easiest to mimic perfection. ;-)

Any ideas why this is happening? The navigation bar, "About US" or "Industries" for example, if you mouse over it (in Chrome) or right click and "copy link" and then paste it somewhere else, you will see the jsessionid I'm talking about.

Thanks--
Nick
Nick Lindberg
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
April 23, 2012 1:37 PM
Answer

Nick Lindberg

Rank: Junior Member

Posts: 28

Join Date: January 5, 2012

Recent Posts

Bump-- I still can't figure this out, even though it's not a huge deal.
Ali Shahrami
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 16, 2012 11:23 AM
Answer

Ali Shahrami

Rank: Junior Member

Posts: 52

Join Date: July 31, 2009

Recent Posts

I'm having exactly the same issue. Anybody?
Ali Shahrami
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 16, 2012 12:37 PM
Answer

Ali Shahrami

Rank: Junior Member

Posts: 52

Join Date: July 31, 2009

Recent Posts

This is related to LPS-14345.
Mika Koivisto
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 16, 2012 3:19 PM
Answer

Mika Koivisto

Rank: Liferay Legend

Posts: 1518

Join Date: August 7, 2006

Recent Posts

Interesting I could see that happening on your site but when I tested it locally it doesn't happen. Usually I just disable appending jsessionid to the url because it's bad for SEO and may allow easier session hijacking. You can disable it by setting following property in your portal-ext.properties:
1session.enable.url.with.session.id=false
Juan Gonzalez
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 17, 2012 5:54 AM
Answer

Juan Gonzalez

Rank: Liferay Legend

Posts: 3065

Join Date: October 28, 2008

Recent Posts

Hi Nick.

Is this happening in IE browser ?
Juan Gonzalez
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 17, 2012 7:09 AM
Answer

Juan Gonzalez

Rank: Liferay Legend

Posts: 3065

Join Date: October 28, 2008

Recent Posts

Mika Koivisto:
Interesting I could see that happening on your site but when I tested it locally it doesn't happen. Usually I just disable appending jsessionid to the url because it's bad for SEO and may allow easier session hijacking. You can disable it by setting following property in your portal-ext.properties:
1session.enable.url.with.session.id=false


Yep, we have a similar problem and can reproduce it in our internal domains (subsubdomain.subdomain.domain.es). Guess is an issue about domains, that's probably the reason it doesn't happen in localhost.

In fact, this is causing some weird errors setting cookies in wrong domains (.es) and loosing cookies for other apps.
Ali Shahrami
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 17, 2012 7:57 AM
Answer

Ali Shahrami

Rank: Junior Member

Posts: 52

Join Date: July 31, 2009

Recent Posts

Mika Koivisto:
You can disable it by setting following property in your portal-ext.properties:
1session.enable.url.with.session.id=false


Mika,

What happens if a browser has disabled cookies. This will not work, right?

Ali
Mika Koivisto
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 17, 2012 10:36 AM
Answer

Mika Koivisto

Rank: Liferay Legend

Posts: 1518

Join Date: August 7, 2006

Recent Posts

If browser has cookies disabled and you have that property set then the user can't authenticate and portlets that rely on portlet session probably won't function correctly. Most if not all Liferay portlets don't rely on portlet session.
Mika Koivisto
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 17, 2012 10:51 AM
Answer

Mika Koivisto

Rank: Liferay Legend

Posts: 1518

Join Date: August 7, 2006

Recent Posts

It could be an issue with site virtual hosts but I did use a domain name instead of localhost when I tried it with my latest master branch build. I also checked it with my site running 6.1.0 and there it's reproducible also. I was just about to open a ticket for this but thanks to Suggestimate I found http://issues.liferay.com/browse/LPS-25587 and it seems to be already fixed. The fix is included in 6.1.1 release.
Juan Gonzalez
RE: Liferay Initial P age Load: "jsessionid" causing links to redirect
May 17, 2012 2:31 PM
Answer

Juan Gonzalez

Rank: Liferay Legend

Posts: 3065

Join Date: October 28, 2008

Recent Posts

We didn't use virtual hosts at the moment (request goes through load balancer), but glad to hear that is solved. Probably is another reason to use virtual hosts in Liferay.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!