-
FEATURED COMPONENTS
First time here? Check out the FAQ!
When opening my app in a new browser instance, for example an incognito window, it always fails to load the CSS file (ERR_ABORTED 404). After a reload, the page works perfectly.
I have configured the following in my zk.xml:
<desktop-config>
<desktop-timeout>60</desktop-timeout>
<theme-uri>/css/monitor.css</theme-uri>
</desktop-config>
I have tested my page in Edge & Chrome, same behavior
The URL on the first load:
localhost:8080/css/monitor.css;jsessionid=3C02551C9FB09BBADD5C1809884B129F
I cannot open this URL in my browser in a new window. (I can however if I replace the ; with a ?).
After the reload the ;jsessionid is not present in the URL, hence it working.
My question: why is my css not available on boot when the URL contains a jsessionid?
My ZK version: ZK 9.6.0.1
I have fixed my issue. This was not a ZK specific issue, but an issue of the integrated tomcat server within my Java application. I fixed this by setting an additional property in my application.properties file, telling tomcat to force using cookies instead of jsessionids.
The property I added: server.servlet.session.tracking-modes=COOKIE
Asked: 2021-12-24 00:16:10 +0800
Seen: 5 times
Last updated: Dec 24 '21