-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I am currently working on a Maven project with the latest version of IntelliJ IDEA. I want to use the auto-completion feature for Bootstrap, but it seems like it's not working because the CSS path is not detected correctly. I would like to know why ZK is unable to locate the CSS file, even though the server can read it correctly when launching.
ZUL file path: webapp/main/index.zul CSS file path: webapp/css/bootstrap.css
ZUL reference:
<zk> <style src="/css/bootstrap.css"/> <script src="/js/bootstrap.bundle.min.js"/>
Could anyone please help me figure out why ZK is not detecting the CSS file and how I can fix this issue? Any guidance would be greatly appreciated.
Thank you.
I'd recommend first checking the browser's developer tools network panel to see what the URL passed to the client for this css file is. It's possible that the URL is either malformed for some reason.
The 2nd step would be to try to open the css file in your browser direct using the url http://yourserver:yourport/yourcontext/css/bootstrap.css
Since CSS files are served directly by the webserver (not processed by a servlet or other), accessing the url of the css file should open it in your browser. If the url is correct, but the css file cannot be opened, then there might be a configuration issue with your project. Depending on the error type you'd get in that circumstance, you may get more information as to why it's not resolved properly.
Asked: 2023-05-11 10:02:16 +0800
Seen: 5 times
Last updated: May 11