Forum Discussion
JCMATTOS_41723
Nimbostratus
May 13, 2009Problems with persistence and JSESSIONID?
I have gone thru the forums and samples and tried different variations of irules to enable persistence with a JSESSIONID cookie. And I can't seem to get it to stick. I've gone thru packet captures and...
JRahm
Admin
May 14, 2009I have seen situations where the server id numbers after the jsessionID change, which would create a different persistence record. To combat that, just strip out the jsessionID from the cookie:
when HTTP_REQUEST {
if { ![HTTP::header exists "jsessionid"] } {
set jsess_uri [findstr [HTTP::uri] "jsessionid" 11 "!"]
if { $jsess_uri != "" } {
persist uie $jsess_uri 3600
}
}
}
when HTTP_RESPONSE {
if { [HTTP::header exists "jsessionid"] } {
set jsessID [findstr [HTTP::header "jsessionid"] "!" 1 "!"]
if { $jsessID != "" } {
persist add uie $jsessID 3600
}
}
}
you might have to tweak this, I haven't tested jsession stuff in months and no longer have access to do so anyway. HTH
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects