Forum Discussion
Irule for jsession ID weblogic support
Here is a start to what that iRule might look like:
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
if { [TCP::payload] contains "PAYMENTID=" } {
log local0. [findstr [TCP::payload] "PAYMENTID=" 10 "\n"]
persist uie [findstr [TCP::payload] "PAYMENTID=" 10 "\n"] 3600
}
TCP::release
TCP::collect
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
if { [TCP::payload] contains "PAYMENTID=" } {
log local0. [findstr [TCP::payload] "PAYMENTID=" 10 ";"]
persist add uie [findstr [TCP::payload] "PAYMENTID=" 10 ";"] 3600
}
TCP::release
TCP::collect
}
We're essentially going to collect the payload of each request and response, looking for the PAYMENTID string to use for the uie persistence. Now this probably isn't going to work just yet though. Without being able to see what your TCP data actually looks like, it would be difficult to create an expression to find the PAYMENTID string in the payload. So you'll need to work this one out.
log local0. [findstr [TCP::payload] "PAYMENTID=" 10 "\n"]
persist uie [findstr [TCP::payload] "PAYMENTID=" 10 "\n"] 3600
log local0. [findstr [TCP::payload] "PAYMENTID=" 10 ";"]
persist add uie [findstr [TCP::payload] "PAYMENTID=" 10 ";"] 3600
The first set are in the client side context (request), and the second set are in the server side context (response). You'll need to capture the payload and see where the PAYMENTID gets inserted by the server, and where the client sends it back, and then create an expression to extract these values.
Recent Discussions
Related Content
* 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