Eric_Waite_1046
Oct 02, 2006Nimbostratus
persist 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 jsession are only passed by the URI, example: http://beta.reading.com/reading/dispSchoolLogin.do;jsessionid=D0944F90E7592CC6ED780464716B6207
The following is written to the log file:
Mon Oct 2 14:40:13 EDT 2006 tmm tmm[989] Rule AppServerJsessionId HTTP_RESPONSE: jsessionid found, jsess is: 32EA5BBD8ACAAFACFC9239AC3F0F7541
Mon Oct 2 14:40:13 EDT 2006 tmm tmm[989] Rule AppServerJsessionId HTTP_REQUEST: Entering REQUEST, jsess is: 32EA5BBD8ACAAFACFC9239AC3F0F7541
Mon Oct 2 14:40:13 EDT 2006 tmm tmm[989] Rule AppServerJsessionId HTTP_REQUEST: Entering REQUEST, jsess is:
Mon Oct 2 14:40:13 EDT 2006 tmm tmm[989] Rule AppServerJsessionId HTTP_RESPONSE: jsessionid found, jsess is: 72EB37E2571E50803B07EE2B85CFE5FB
Mon Oct 2 14:40:13 EDT 2006 tmm tmm[989] Rule AppServerJsessionId HTTP_REQUEST: Entering REQUEST, jsess is: 72EB37E2571E50803B07EE2B85CFE5FB
The request is not being persisted to the client properly and it is throwig me to the wrong server.
Anyone have any suggestions?
when HTTP_REQUEST {
set uri [HTTP::uri]
set jsess [findstr $uri "jsessionid" 11 "?"]
log local0. "Entering REQUEST, jsess is: $jsess"
if { $jsess != "" } {
persist uie $jsess
}
}
when HTTP_RESPONSE {
if { [findstr $uri "jsessionid"] > 0}{
set jsess1 [findstr $uri "jsessionid" 11 "?"]
log local0. "jsessionid found, jsess is: $jsess1"
persist add uie $jsess1
}
}
Thank you.
Eric