How to pass JSESSIONID in headers rather than as a url parameter?

Hello

I want to connect a java web application (WAR hosted on Payara Server) to a CAS server in my company. The IT department has configured it so that it can be authorized on the SSO side.

But we get an error after authentication because the url before and after authentication is different. Payara seems to add a JSESSIONID to the url, transforming it and preventing us from continuing on our application.

My question is: how can we ensure that the jsessionid is passed in the headers rather than as a url parameter?

Thanks for your help
TH