I'm using the JSF 2.2. I can't add .css
in my .xhtml
page. Code in .xhtml
<h:head>
<title>Login Page</title>
</h:head>
<h:body>
<h:outputStylesheet library="resources/css" name="style.css" id="cascade1"/>
Also I tried declare it into a <h:head>
with the same result. FireBug is seeing this resource but it is showing message:
Reload the page to get source for .../javax.faces.resource/style.css.xhtml;...
There is no need to use the library
attribute:
<h:outputStylesheet name="css/style.css" />
This way, the JSF servlet expects the style.css
file to be in /resources/css
path.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.