0

CSS 404 on first load

asked 2021-12-24 00:16:10 +0800

SaltroadPatrol gravatar image SaltroadPatrol
26 1

updated 2021-12-24 02:15:59 +0800

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

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-12-24 21:39:40 +0800

SaltroadPatrol gravatar image SaltroadPatrol
26 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

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2021-12-24 00:16:10 +0800

Seen: 5 times

Last updated: Dec 24 '21

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More