I was checking this question: How to use Font Awesome from webjars.org with JSF ant this question: FontAwesome with PrimeFaces with its answer https://stackoverflow.com/a/33070133/5113188
Hi I want to use the new icons of https://fontawesome.com/changelog/latest 5.5 version
In my pom.xml
file project...
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.2</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.2</version>
</dependency>
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>2.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.webjars/font-awesome -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>5.5.0</version>
</dependency>
in my web.xml
file
<!-- Fontawesome -->
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
In my facelet .xhtml
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
template="/templates/template.xhtml">
<ui:define name="body">
<h:outputScript library="webjars" name="font-awesome/5.5.0/js/all.js"/>
...
<p:spacer width="10"/>6
<h:outputText styleClass="fas fas-map"/>7
<h:outputText styleClass="fa fa-venus-mars fa-icon-custom" />
<h:outputText styleClass="fa fa-female fa-icon-custom" />
<h:outputText styleClass="fa fa-male fa-icon-custom" />
Note: I'm using fas
and fa
, but neither is working
Like shown my image all icons are failing
How solve this?