Forum Discussion
Eric_Waite_1046
Nimbostratus
Oct 02, 2006persist jsession by uri
I know thi shas be gone over a whole bunch of times, and after alot of playing around I am using an example from a previous post:
What I need to accomplish is to persist by jsessionid, and j...
JRahm
Admin
Oct 03, 2006I am using the session table to accomplish this:
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
set jsessID [lindex [split [HTTP::cookie "JSESSIONID"] "!" ] 0 ]
if { [session lookup uie $jsessID] equals "" } {
session add uie $jsessID [IP::server_addr] 1800
log local0. "added server entry [session lookup uie $jsessID] for jsessionID $jsessID "
} else {
log local0. "existing server entry [session lookup uie $jsessID] for jsessionID $jsessID"
}
}
}
when HTTP_REQUEST {
if { [findstr [HTTP::uri] "jsessionid" 11 "!"] != ""} {
pool myApp-pool member [session lookup uie [findstr [HTTP::uri] "jsessionid" 11 "!"] ]
log local0. "jsessionID [findstr [HTTP::uri] "jsessionid" 11 "!"] sent to [session lookup uie [findstr [HTTP::uri] "jsessionid" 11 "!"] ]"
} else {
pool myApp-pool
log local0. "No jsession ID, local balancing the connection..."
}
}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
