Jsf 为什么找不到我的函数?
这是我的密码Jsf 为什么找不到我的函数?,jsf,jsf-2,omnifaces,Jsf,Jsf 2,Omnifaces,这是我的密码 <html (...) xmlns:of="http://omnifaces.org/functions"> ... <c:set var="formattedDate" value="#{of:formatDate(now, 'dd/MM/yyyy')}" /> 这是我的pom.xml ... <dependency> <groupId>org.omnifaces</groupId> <
<html (...) xmlns:of="http://omnifaces.org/functions">
...
<c:set var="formattedDate"
value="#{of:formatDate(now, 'dd/MM/yyyy')}" />
这是我的pom.xml
...
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>1.7</version>
</dependency>
<?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>
。。。
org.omnifaces
全方位
1.7
这是我的web.xml
...
<dependency>
<groupId>org.omnifaces</groupId>
<artifactId>omnifaces</artifactId>
<version>1.7</version>
</dependency>
<?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>
运动场
index.html
index.htm
index.xhtml
index.jsp
default.html
default.htm
default.jsp
Facesservlet
javax.faces.webapp.FacesServlet
1.
Facesservlet
*.xhtml
可能还没有将Omnifaces库添加到类路径中
mvn clean install
应该可以做到这一点。您是否设置了的命名空间?您确定Omnifaces lib在类路径中吗?你能试着运行mvn clean install
?@kocko你是我的救命恩人:)实际上,Eclipse没有在我的web应用中包含jar!谢谢。@kocko快点做。。。因为我正要删除这个问题…:事实上,Eclipse完全忽略了Maven库。我必须通过执行Project Properties>Deployment Assembly来添加它们,然后添加Maven库。