Linked Questions
121 questions linked to/from How to reference a CSS / JS / image resource in JSF?
16 votes
1 answer
44k views
How to include JavaScript files by h:outputScript? [duplicate]
I want to use jQuery Validate plugin with JSF for client side form validation. I am finding basic difficulty in importing the resources. In my JSF page I have <h:outputScript library="js" name="...
5 votes
4 answers
22k views
Unable to find resource css, style.css [duplicate]
I created a Java JSF application in NetBeans 8.02 with GlassFish 4.1. One of the web pages created as a facelet contains the following tags: <h:head> <title>Address Book: Add ...
4 votes
1 answer
22k views
Including Css in jsf [duplicate]
This is my project structure: I am going to add css file into HeaderTester.xhtml file: This is HeaderTester.xhtml: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD ...
6 votes
1 answer
7k views
Stylesheet file not found by <h:outputStylesheet> [duplicate]
Trying to include stylesheet in JSF2 using below tag <h:outputStylesheet name="css/test.css" /> However it's not picking and the directory structure of the stylesheet as follows WebContent-->...
4 votes
1 answer
5k views
How to reference an img in p:graphicImage from the resource folder [duplicate]
I have an image in the following path: resources \_____img \_______sites \_______reddit.png I used this command line to reference it: <p:graphicImage library="img" name="/sites/reddit.png"/>...
0 votes
1 answer
4k views
Correct path in PrimeFaces View [duplicate]
I'm using PrimeFaces version 5.2 and Glassfish as server to deploy my results. I've coded a short example in order to download a file from the server and I'm getting problems showing the GIF image ...
1 vote
4 answers
3k views
for a CSS File --> http status 404 - the requested resource is not available [duplicate]
I am getting the "http status 404 - the requested resource is not available" error for my template.css file. From my research i have figured that it is a problem of referencing. Because of the error, ...
0 votes
1 answer
5k views
Change style and icon on primefaces calendar [duplicate]
I am trying to change the default style on primefaces calendar and tried many solution but still no idea how to change it. For example i want to change the button icon. This is my calendar in my ....
2 votes
1 answer
2k views
how to add css file to maven project + primefaces [duplicate]
my css file dosent work. opera shows me: http://localhost:8080/formularz-web/faces/javax.faces.resource/css/mycss.css Failed to load resource: the server responded with a status of 404 (Not Found) ...
1 vote
2 answers
913 views
integrating jquery with jsf [duplicate]
When I have a JSP page with jQuery, I don't have any problem executing the page. When I use the same code in a Facelets page with JSF, jQuery doesn't seem to work. It is not recognizing the id ...
2 votes
2 answers
1k views
empty css while using @import in a css link [duplicate]
My css files are loaded empty I checked in firebug my css file all.css it is recognized and a.css,b.css,c.css are also recognized but the problem that they are empty all.css @import url(a.css) @...
1 vote
1 answer
1k views
graphicImage not correct url [duplicate]
I've the following primefaces component, it should just load images that are under /WEB-INF/Resource/{1.png,2.png,3.png,4.png}. <p:ring id="weatherForecasts" value="#{eventPageCreatorBean....
0 votes
1 answer
1k views
<h:outputstylesheet > doesn't work [duplicate]
I am working on a migration project from jsf 1.2 to jsf 2.2, I followed correctly the steps to do this migration but when I want to change the old tag to import css files by the new tag ,this later ...
0 votes
3 answers
870 views
p:galleria does not show images [duplicate]
I want to use Primefaces galleria. I have seen galleria but I am not able to display images. I have tried these following codes: Galleria.xhtml <h:body> <p:galleria value="#{imagesView....
0 votes
1 answer
844 views
Java web application cascade style sheets: where do I put them? [duplicate]
I'm writing a Java web application using JSF and Primefaces. I have to load a cascade style sheet named general.css and then I have the following line in my HTML head section: <h:outputStylesheet ...