Technical Forum
Ask questions. Discover Answers.
Showing results for 
Search instead for 
Did you mean: 

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


when HTTP_REQUEST {   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    }   } } when HTTP_RESPONSE {   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:






You always attach One Connect right? Please check and try with one connect and if there are issues with LB::detach as described. You can also test with hash persistence based on the JSSESSION . Also if the servers are configuring the cookie (you use hash cookie so Ithink they add a cookie) is easier to use that cookie than you adding the cookie on the F5 device. You may also check for TCL errors in the LTM log as I think you have taken the example from /


Thank you for answer Nikoolayy1. Yes I always attach OneConnect as I understand it is mandatory for proper persisting. I will try your suggestions asap and see what happens.


Could you tell me also what does 11 mean in:

set jsess [findstr [string tolower [HTTP::path]] "jsessionid=" 11] ?