Some of the entries in the table were showing uri instead of jsessionid. I think that is because of the the application doesn't use jsessionids. I have improved the code to keep the LTM from adding the bad entries to the table.
Below is my code at this point. I have a tester looking into it now to see if it is working.
when HTTP_REQUEST {
if { [HTTP::uri] contains "/mosAppWar" }{
Make jsess equal the jsessionid
set jsess [findstr [HTTP::uri] "jsessionid" 11 "."]
Make sure that jsessionid is actually there since some requests don't have one.
if {[HTTP::uri] matches_regex {jsessionid} } {
Make sure jsessionid is not blank before adding it to the UIE.
if { $jsess ne "" } {
Commit the record to the LTM database for 5400 seconds.
persist uie $jsess 5400
}
}
Since it is /mosAppWar send the host to the application pool.
pool CIBC_Express_Application_Pool
log local0. "QA2 Server: [LB::server addr] jsessionid $jsess Query: [HTTP::uri][HTTP::query]"
log local0. "URI: [HTTP::uri][HTTP::query]"
return
Send all other requests to the static pool.
} else {
pool CIBC_Express_Static_Pool
return
}
}