I’m creating REST application based on spring and apache tiles. I’ve added .css file and on main page it work everything. I mean when I’m on domain.com/ but when I’ll go to domain.com/something/ the url is the same and it’s wrong. I would have to add ../ at the start of .css file path
How can I create (by auto) correct file path on every subpage ?
Use absolute paths rather than relative paths:
rather than
You must also make sure that the web app’s context path is always prepended, so the path should in fact be
or, if you use the JSTL: