I'm porting an old application from WebLogic to JBoss EAP 7.4. The application fully works in my local EAP 7.4 environment and it uses JSF (so xhtml files).
When we deployed the application to the test environment on Openshift, the application kept working fine if we accessed it from the hostname of the Openshift pod where it's hosted.
But the application breaks when the DNS for the test environment was switched from the old WebLogic one to the new Openshift one. In particular, it generates links with jsessionId appended to them, for example in the icon to change language:
<form id="change_Language_Form" name="change_Language_Form" method="post" action="/context/myappname/pages/MyPage.xhtml;jsessionid=BacTT73WcuQB9E6fi9TIU1SL7aOt58SP3J5i1QbM.myapp-40-j5w9n" class="wrap" enctype="application/x-www-form-urlencoded">
or in an iframe that includes a CSS:
<link type="text/css" rel="stylesheet" href="/static-context/Css/template.css;jsessionid=A1-3JO4DzGpUohA2Hz34mC5C8RE9zjLIQfRaG_QP.myapp-40-j5w9n">
(I just noticed that the two sessionIds from the same page at the same time are different, is this a problem?)
The static resources are served by an Apache front end from the /static-context path, whereas the application is deployed in the /context path.
I tried to look for solutions to this:
- MKyong suggests turning page session off in the JSP, but we don't have JSPs, we have xhtml pages with facelets.
- Other stackoverflow responses suggest setting
<tracking-mode>COOKIE</tracking-mode>in the web.xml which completely breaks the application.
In the old weblogic.xml file there was this setting:
<session-descriptor>
<cookie-name>MYSESSIONID</cookie-name>
<session-descriptor>
Obviously JBoss doesn't read this file. Could this be the issue? What's the equivalent for JBoss?