Extending the session/jsessionId


JSESSIONID is a cookie generated by Servlet container like Tomcat or Jetty and used for session management in J2EE web application for http protocol. 

Since HTTP is a stateless protocol there is no way for Web Server to relate two separate requests coming from same client and Session management is the process to track user session using different session management techniques like Cookies and URL Rewriting.

If Web server is using cookie for session management it creates and sends JSESSIONID cookie to the client and than client sends it back to server in subsequent http requests.

This cookie is valid still the browser session is available.

We can view this JSessionId in the chrome as



If we want this jsession cookie should  be present certain period of time. How can we do it?

In liferay  it can be done just by adding the entry in the web.xml

Go to the
1. <liferay-path>/tomcat/webapps/ROOT/WEB-INF/
 2. Open the web.xml and add the "cookie-config"

Full snippets are below


30

28800






Comments

Popular posts from this blog

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate

Executing the BackGround Task