How to get the jSessionId from a velocity template in liferay

Just a quick tip because I´ve been searching for it a while.

When you´re creating inter - portal links and your portal is using jsessionids to identify the logged in user you might run into the situation where a link created in a web content (JournalArticle Link To Page) doesn´t contain the jsessionid and everyone who follows that link is no longer logged in.

What you need to do in this situation is to attach the jsession id to your link. This is how you do it. You can use the "Link To Page" Structure Entity that liferay is giving you and then simply add the portlet session id:

<a href="${link.getUrl()};jsessionid=$request.get('portlet-session-id')"> 


$theme.runtime("145") after liferay crash

If your liferay server crashed and after the crash your dockbar disappeared and you see this error message ...

and this repeating over and over again in your log file ...

at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:136)
at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:320)
at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:357)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:467)
at org.apache.jasper.compiler.Parser.parseFileDirectives(Parser.java:1779)
at org.apache.jasper.compiler.Parser.parse(Parser.java:135)

...I might have the solution for you. The solution is to replace the file view_user_account.portal.jspf in ROOT/html/portlet/dockbar/ with a fresh version from your zip. Do this and restart the server and you should be good.