Julian_Annison_
Apr 29, 2005Nimbostratus
SAP persistence using jsessionid
Below is an explanation(give to me be a SAP consultant) of what happens when a user logs into a SAP portal the jsessionid that we would like to persist on can be in the url or a cookie is there a simple way to search for the jsessionid value between the brackets and persit on it this value can be a variable length an anywhere in the url.
We are trying to use an F5 to replace a SAP web dispatcher if anyone is familiar with that product.
I have tried one of the WEBlogic iRules which seemed to need the sme kind of rule but it didn't work.
Any help would be greatly appreciated
Thanks
Julian
1) A user logs on to the Portal and gains the following cookies of relevance to us here
•Set-Cookie: sapj2ee_*=942620174; Version=1; Path=/
•Set-Cookie: JSESSIONID=(UKLONSAP003_QP7_00)ID942620174DB0.4130594099718703End; Version=1; Domain=.uk.mycompany.com; Path=/irj/
•Set-Cookie: MYSAPSSO2=AjExMDAgABFwb3J0YWw6dWtzYXB1YXQyN4gAB2RlZmF1bHQBAApVS1NBUFVBVDI3AgADMDAwAwADUVA3BAAMMjAwNTAyMjUwODMxBQAEAAAACAoAClVLU0FQVUFUMjf%2FAVAwggFMBgkqhkiG9w0BBwKgggE9MIIBOQIBATELMAkGBSsOAwIaBQAwCwYJKoZIhvcNAQcBMYIBGDCCARQCAQEwajBlMQswCQYDVQQGEwJERTEcMBoGA1UEChMTU0FQIFRydXN0IENvbW11bml0eTERMA8GA1UECxMIRGVsb2l0dGUxFzAVBgNVBAsTDnBvcnRhbHBsYXRmb3JtMQwwCgYDVQQDEwNRUDcCAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA1MDIyNTA4MzE0MlowIwYJKoZIhvcNAQkEMRYEFByYNdK9jHboiGic5kXS11t%2F7rR%2BMAkGByqGSM44BAMELjAsAhQtlcohNAZjI%2B2wpLy6zJUX9murkAIUc8U4feJspD5ECYrHBWNRXyqVWdI%3D; HttpOnly; Domain=uk.mycompany.com; Path=/
The JSESSIONID cookie has a path attribute so that calls to other non Portal J2EE's will not use this cookie.
The MYSAPSSO2 cookie will be used everywhere so does not have a path
The sapj2ee cookie is not used by the Webdynpro J2EE's as they are a newer release and so does not need a path.
2) A call is made to project management on the J2EE with the MYSAPSSO2 cookie and the following are set
•set-cookie: saplb_*=(J2EE808190400)808190450; Version=1; Path=/webdynpro/dispatcher/
•set-cookie: JSESSIONID=(J2EE808190400)ID808190450DB1218742496146419353End; Version=1; Path=/webdynpro/dispatcher/
Both of these cookies are set with a path attribute to ensure they are only passed with Webdynpro calls.
3) The user click on part of project management which produces a Webdynpro get to obtain information on the PDF
4) On the J2EE 640 server the project management application acts as a client and sends a request to run a non Webdynpro application with POST /sapphirej2ee/upload
5) The sapphirej2ee application returns the session information about its location back to the project management application in the form of a URL like as follows
•/sapphirej2ee/output;jsessionid=(J2EE813210800)ID813210850DB1218862027862180632End;saplb_*=(J2EE813210800)813210850
This example shows the sapphirej2ee application can be running on a different server.
6) The Webdynpro project management application sends this response back to the client who in turn then issues a GET for the information
•GET /sapphirej2ee/output;jsessionid=(J2EE813210800)ID813210850DB1218862027862180632End;saplb_*=(J2EE813210800)813210850 HTTP/1.1
•Cookie: MYSAPSSO2=AjExMDAgABFwb3J0YWw6dWtzYXB1YXQyN4gAB2RlZmF1bHQBAApVS1NBUFVBVDI3AgADMDAwAwADUVA3BAAMMjAwNTAyMjUwODMxBQAEAAAACAoAClVLU0FQVUFUMjf%2FAVAwggFMBgkqhkiG9w0BBwKgggE9MIIBOQIBATELMAkGBSsOAwIaBQAwCwYJKoZIhvcNAQcBMYIBGDCCARQCAQEwajBlMQswCQYDVQQGEwJERTEcMBoGA1UEChMTU0FQIFRydXN0IENvbW11bml0eTERMA8GA1UECxMIRGVsb2l0dGUxFzAVBgNVBAsTDnBvcnRhbHBsYXRmb3JtMQwwCgYDVQQDEwNRUDcCAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA1MDIyNTA4MzE0MlowIwYJKoZIhvcNAQkEMRYEFByYNdK9jHboiGic5kXS11t%2F7rR%2BMAkGByqGSM44BAMELjAsAhQtlcohNAZjI%2B2wpLy6zJUX9murkAIUc8U4feJspD5ECYrHBWNRXyqVWdI%3D; SAPWP_active=1; DSMKeepAliveStamp=1109320311571
We are having problems with the F5 in production and I suspect this is down to the fact that the GET /sapphirej2ee statement issued by the client is being routed to the server where the Webdynpro application is running.
We need the F5 to identify the correct server from the URL. The gobbledegook jsessionid can be related to the server that can be obtained by the F5 frequently retrieving load balancing information from the Java engine message server