Change theme of the first faces

Asked

Viewed 1,413 times

0

I’m trying to change the theme of primefaces, downloaded all available themes using Maven and my web.xml file was like this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <display-name>evolutionary</display-name>
    <display-name>evolutionary</display-name>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>blitzer</param-value>
    </context-param>
</web-app>

The structure of my app is like this:

inserir a descrição da imagem aqui

I have 2 web.xml files in the project: 1 is within Webcontent/WEB-INF. The other is in src/main/webapp/WEB-INF. What is configured is the second. This may influence?

  • 1

    If your project is Maven, you don’t need the Webcontent folder. Yes, in a Maven project the web.xml that goes to the application is what is inside the webapp/WEB-INF folder

1 answer

1

I believe so, but for me it worked like this:

The theme should be changed in web.xml as you have done but in the directory WebContent/WEB-INF,
and you should also have put the themes downloaded from Primefaces in the directory

WebContent/WEB-INF/lib

Browser other questions tagged

You are not signed in. Login or sign up in order to post.