Since the jsessionid must be contain in the response it should be possible to do it by parsing the response.
To do so, you can use HTTP::collect and HTTP::payload to be able to parse the response and activate the persistency on the first response of the web server
You have a example about how to use those commands here:
Click here
Then once you have the payload you just need to extract the jsessionid and activate persistency
when HTTP_RESPONSE {
trigger collection for up to 1MB of data
if {([HTTP::header exists "Content-Length"]) && ([HTTP::header "Content-Length"] <= 1000000)}{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1000000
}
if { info exists content_length } {
HTTP::collect $content_length
}
}
when HTTP_RESPONSE_DATA {
if {[HTTP::payload] contains "jsessionid"} {
set jsessionid [findstr [HTTP::payload] "jsessionid" 11 "."]
persist add uie $jsessionid
}
}