Forum Discussion

Albert__Tase_70's avatar
Albert__Tase_70
Icon for Nimbostratus rankNimbostratus
Jan 28, 2009

persistance using Jsession ID

Hello

 

 

Need some help not sure it will even work but

 

would like to create an irule that uses Jsession id for persistance and then inserts it into the uri to maintain persistance based on the uri for apps that do not use cookies any ideas ?

 

 

 

thanks

 

 

2 Replies

  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    You might also consider inserting the jsession ID into a custom HTTP header rather than tacking it on to the end of the URI. In any case, have a look at the following:

    http://devcentral.f5.com/wiki/default.aspx/iRules/Weblogic_JSessionID_Persistence.html.

    A method for persisting on jsessionids that are set in cookies could be as simple as:

     
        when HTTP_REQUEST {     
            if { [HTTP::cookie exists "JSESSIONID"] } {     
               persist uie [HTTP::cookie "JSESSIONID"]     
            }  
         }     
         when HTTP_RESPONSE {     
            if { [HTTP::cookie exists "JSESSIONID"] } {     
               persist add uie [HTTP::cookie "JSESSIONID"]    
            }     
         } 
     

    You'd need to grab the value of the cookie and append it to the URI in a way that would make sense to your apps (a name-value pair in a query string, I'm guessing?)

    JQ
  • With jsessionid's, shouldn't the application detect whether the client supports cookies and insert the jsessionid in the URI's if the client doesn't support cookies?

     

     

    Aaron