jsf - Why is my function not found? -


here code

<html (...) xmlns:of="http://omnifaces.org/functions">  ... <c:set var="formatteddate"     value="#{of:formatdate(now, 'dd/mm/yyyy')}" /> 

when run it, error:

value="#{of:formatdate(now, 'dd/mm/yyyy')}" function 'of:formatdate' not found javax.faces.webapp.facesservlet.service(facesservlet.java:606) 

here pom.xml

... <dependency>     <groupid>org.omnifaces</groupid>     <artifactid>omnifaces</artifactid>     <version>1.7</version> </dependency> 

here web.xml

<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0">   <display-name>jsfplayground</display-name>   <welcome-file-list>     <welcome-file>index.html</welcome-file>     <welcome-file>index.htm</welcome-file>     <welcome-file>index.xhtml</welcome-file>     <welcome-file>index.jsp</welcome-file>     <welcome-file>default.html</welcome-file>     <welcome-file>default.htm</welcome-file>     <welcome-file>default.jsp</welcome-file>   </welcome-file-list>   <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>*.xhtml</url-pattern>   </servlet-mapping> </web-app> 

possibly omnifaces lib has not been added classpath.

mvn clean install should trick.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -