How to access files from this hierarchy?
I need to access from the jsp files which are in WebContent/jsp folder, to the *.css file which is in WebContent/css.
And I've tried using
link rel="stylesheet" type="text/css" href="../css/adminStyle.css". But, sometimes the *.css works and sometimes it doesn't.
Another thing is how do I access from a *.css file to an image in imgs folder. And I tried using
The hierarchy is the following:
css | +---> adminStyle.css imgs | +---> background.png jsp | +---> admin.jsp
"sometimes the css works and sometimes not" looks like you it works for some url and doesn't work for some url. for this @rickz answer will work
This will eliminate the possibility of breaking css import with regards of url
for second question "how do I access from a css file to an image in imgs folder"
because relative path of background image defined in css will start from the folder where your css file is.