Applying a theme in PrimeFaces

I am using PrimeFaces 3.1 in my project. I am facing a problem while applying a theme. I added the dark-hive-1.0.3.jar project to the project and configured it in web.xml as follows.

 <context-param> <param-name>primefaces.THEME</param-name> <param-value>dark-hive</param-value> </context-param> 

When I run the project, the following exception is thrown.

javax.faces.FacesException: error loading theme, cannot find resource "theme.css" of the library "primefaces-dark-hive"

How does this problem arise and how to solve it?

+6
source share
1 answer

It should be placed in the /WEB-INF/lib folder of the web application. If you use the IDE, do not play with the "build path properties" of the project. Simply removing the JAR in the /WEB-INF/lib folder will launch all the IDE magic to complete the necessary tasks.

+8
source

Source: https://habr.com/ru/post/915712/


All Articles