您必须添加最新的facelets,richfaces 3.3.3和jsf 2.x库.这是我用于我的项目的web.xml配置:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
<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>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>
<!--Configuration for Richfaces-->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!--End of the configuration part for Richfaces-->
<!--Configuration for Facelets-->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jsp</param-value>
</context-param>
<context-param>
<param-name>facelets.RECREATE_VALUE_EXPRESSION_ON_BUILD_BEFORE_RESTORE</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.VIEW_MAPPINGS</param-name>
<param-value>*.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<!--End of the configuration part for Facelets-->
<welcome-file-list>
<welcome-file>faces/index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Run Code Online (Sandbox Code Playgroud)
这是你可以在我的库中找到的:standard.jar(对于JSTL)
jstl.jar(用于JSTL)
jsf-facelets.jar(Facelets 1. 1. 15)
RichFaces的-API 3.3.3.Final.jar
RichFaces的 - implement执行,jsf2-3.3.3.Final.jar
RichFaces的-UI-3.3.3.Final.jar
公地的BeanUtils-1.8.3.jar
公地集合-3.2.1.jar
公共沼气池-2.0.jar
共享记录-1.1.1.jar
jsf-api.jar(适用于JSF2)
jsf-impl.jar(用于JSF2)
HTH.
归档时间: |
|
查看次数: |
15264 次 |
最近记录: |