Saturday, May 9, 2015

Change Default JSESSION ID Name for ADF Application

By Default, every ADF Application writes a JSESSIONID Cookie which maintains the session across the ADF application.

The name JSESSIONID is default and can be seen in browser cookies.

Use Case : There might be scenario where this default name required to be changed. One example can be that there is a requirement for running two applications , one ADF Application and other might be existing application. The existing application already use JSESSIONID as cookie name for session management. In that case there will be a conflict between the two applications. In order to solve this we need to give different name of SessionId for ADF Application.

Created a simple ADF application





Created a simple page SessionTest.jspx with output text Session Test Page.

Run the page and check the cookie name in Browser - e.g. Mozilla 



We see the default JSESSIONID.

Now to change this to other name , we need to make an entery in weblogic-application.xml. We need to add <session-descriptor> and value of Session Id.





In our example we added PROJECT-JSESSION.

Now redeploy the application and run the page. Again see the cookie in Mozilla.


So the name of JSESSION ID is changed and we can save name conflicts for this particular type of requirement.

Thanks














6 comments:

  1. Thanks for posting these images which is very useful to learn and understand how to create a simple ADF application. event app android

    ReplyDelete
  2. Hi Rohan, very good info, great effort, thanks for providing in-depth information on Oracle ADF Technology. Please continue sharing.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Hi Rohan,

    when i add it doesn't allow(error).
    I am using Jdev 12c(12.2.1.0).

    please help me on this.

    Regards,
    Manish

    ReplyDelete