Forum Discussion

_Tom991's avatar
Icon for Nimbostratus rankNimbostratus
Mar 18, 2021

JSESSIONID Persistance based on jsessionid in URL


I've been asked to have a look at problem with passing jsessionid in the url in our apache tomcat. I'm trying to re-create stickysession from mod_proxy:

stickysession - Balancer sticky session name. The value is usually set to something like JSESSIONID or PHPSESSIONID, and it depends on the backend application server that support sessions. If the backend application server uses different name for cookies and url encoded id (like servlet containers) use | to separate them. The first part is for the cookie the second for the path.

iRule used from

  if { [HTTP::cookie "JSESSIONID"] ne "" }{
   persist uie [string tolower [HTTP::cookie "JSESSIONID"]] 3600

  } else {
   set jsess [findstr [string tolower [HTTP::path]] "jsessionid=" 11]
   if { $jsess != "" } {
     persist uie $jsess 3600
  if { [HTTP::cookie "JSESSIONID"] ne "" }{
   persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 3600

Basically I follow the instructions as stated in document but for some reason ;jsessionid= dissapears from URL (works with cookie hash)

  1. Create iRule
  2. Create Universal Profile with iRule attached to it + Match across services
  3. Attach HTTP profile + Universal Profile + OneConnect

Currently VIP is using cookie hash persistance with oneconnect, JSESSIONID cookie name and ;jsessionid= is present in URL

Could you please give me some ideas why sessionid is not passed into URL when iRule and Universal Profile is used or is there easier way to perform this task?

What I'm trying to accomplish:


and the cookie should be:


2 Replies