Search code examples
weblogic11gweblogic12cjsessionid

can I change jsessionid cookie name on weblogic en masse


belatedly realised that hosting related applications on 2 separate weblogic clusters was not good news for users with multi tabbed browsers. An answer I believe is to give the applications different jsessionid cookie. I understand this can be specified on an application basis in weblogic.xml, but this is going to be timeconsuming and error prone. Is there any robust way to enforce this on all applications within a cluster?


Solution

  • You can override session cookie name (configured in your weblogic.xml deployment descriptor) using a deployment plan.

    This allows you to use the default JSSESSIONID in all your apps in your development topology (usually just an Admin Server with all apps deployed) and customized your cookies names per app/cluster without editing your war file.

    You can easily automate your deployments including your plan XML file as an extra argument in the deploy WLST command:

    wls:/mydomain/serverConfig/Servers> deploy('App1', 
    '/apps/app1/App1.ear', targets='myserver', planPath='/apps/app1/plan/stage-plan.xml')
    

    You can find an Oracle Tutorial about Deployment Plans and WLS 12c in http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/12c/09-DeployPlan--4464/deployplan.htm?cid=6114&ssid=4153751345526#top