Jump to content
Welcome to our new Citrix community!

JSessionID


Recommended Posts

Hi all,

 

I am trying to add a JSessionID based persistence on one of the staging VIP but when I follow the following KB, I get  an invalid syntax error message. So I am not sure where I am going wrong with this.

I am on ADC 12.1. Any help on this will be appreciated

 

https://support.citrix.com/article/CTX211366 
https://support.citrix.com/article/CTX135275 

 

 

Expression syntax error

 

Expression

HTTP.REQ.COOKIE.VALUE(\”jsessionid\”) ALT HTTP.REQ.URL.BEFORE_STR(\”?\”).AFTER_STR(\”;jsessionid=\”) ALT HTTP.REQ.URL.AFTER_STR(\”;jsessionid=\”)

 

Response

HTTP.RES.SET_COOKIE.COOKIE(\”jsessionid\”).VALUE(\”jsessionid\”)

 

I have also tried modifying this to and I get Expression syntax error [ES_HEADER(^\*jsession, Offset 16]

 

Expression

HTTP.REQ.HEADER(\"JsessionID\").VALUE(0).TYPECAST_NVLIST_T(\'=\',\';\').VALUE(\"JsessionID\")

 

Response
HTTP.RES.HEADER(\"JsessionID\").VALUE(0).TYPECAST_NVLIST_T(\'=\',\';\').VALUE(\"JsessionID\")

 

Regards,

 

A

Link to comment
Share on other sites

HTTP.REQ.COOKIE.VALUE("jsessionid") ALT HTTP.REQ.URL.BEFORE_STR("?").AFTER_STR(";jsessionid=") ALT HTTP.REQ.URL.AFTER_STR(";jsessionid=")

and

HTTP.RES.SET_COOKIE.COOKIE("jsessionid").VALUE("jsessionid")

 

works in GUI

 

20 minutes ago, Carl Stalhood1709151912 said:

Are the quotes straight instead of curly?

As Carl said - you're probably not using proper "quotes"

  • Like 1
Link to comment
Share on other sites

1 hour ago, Adil Khan1709158339 said:

still dont see a curly bracket in the original expression.

 

Not curly bracket, but curly quotes/smart quotes:  (\”;jsessionid=\”)  instead of (\";jsessionid=\")

The cli and gui can't convert smart quotes to straight quotes.

So if copying/pasting or editing from scratch use a text editor as opposed to word; some websites/blogs/pdfs may convert the quotes causing the problem...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...