JDK 1.6 with Tomcat 6 Server. When Run with Tomcat 6 Server, Found Exception starting richfaces. The External libraries files are included in "Java Build Path" with richfaces 3.2.1.GA Jar files.
控制台错误消息:
SEVERE: Exception starting filter richfaces
java.lang.IllegalStateException: Filter mapping for chameleon filter richfaces do not contain wilcard prefix or suffix
at org.ajax4jsf.webapp.WebXml.setFilterName(WebXml.java:432)
at org.ajax4jsf.webapp.WebXml.init(WebXml.java:182)
at org.ajax4jsf.resource.InternetResourceService.init(InternetResourceService.java:130)
at org.ajax4jsf.webapp.BaseFilter.init(BaseFilter.java:181)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Apr 4, 2019 4:31:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Add ajax4jsf-1.1.1.jar and richfaces-3.0.1.jar Files in Tomcat6/lib Folder
Web.xml
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.resourceOptimization.enabled
</param-name>
<param-value>true</param-value>
</context-param>
<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>