I have a problem with dynamically loaded CSS files in a JSF application running on tomcat 7.
If I load the CSS file on a static way like
<link href="mystyle.css" rel="stylesheet" type="text/css">
all is ok and the web page looks fine. But if I trying to load the CSS file dynamically like
<link href="#{pageManagerBean.getCSSFile()}" rel="stylesheet" type="text/css">
where pageManagerBean.getCSSFile() returns "mystyle.css", the CSS file will be not loaded. The browser gets from tomcat a "404 - Not found". But if I doing a browser refresh the CSS file is found and the web site looks fine.