我有一个运行Mojarra 2.2.6和Richfaces 4.5.0的应用程序,它在Tomcat 7.0上工作得很好,但是我们需要它在4.2.2.GA上为客户端运行。使用JSF 2.2.4和RF 4.1时,用于在服务器上运行的应用程序没有任何问题,现在似乎在我的本地机器上没有任何效果。
这是我得到的错误
11:10:15,719 ERROR [STDERR] sept. 09, 2015 11:10:15 AM com.sun.faces.config.ConfigureListener contextInitialized
INFOS: Initialisation de Mojarra 2.2.6 ( 20140304-1537 https://svn.java.net/svn/mojarra~svn/tags/2.2.6@12949) pour le contexte «/EPS_2»
11:10:21,991 ERROR [STDERR] sept. 09, 2015 11:10:21 AM com.sun.faces.spi.InjectionProviderFactory getProviderInstance
GRAVE: JSF1029 : The specified InjectionProvider implementation «org.jboss.web.jsf.integration.injection.JBossInjectionProvider» does not implement the InjectionProvider interface.
11:10:22,385 ERROR [STDERR] sept. 09, 2015 11:10:22 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFOS: JSF1048 : PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
这是我的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"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>EPS</display-name>
<welcome-file-list>
<welcome-file>index.xhtml</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>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<!-- BEGIN PARAM FOR JBOSS DEPLOYMENT-->
<listener>
<listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
</listener>
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
<!-- <context-param>
<param-name>com.sun.faces.injectionProvider</param-name>
<param-value>org.jboss.web.jsf.integration.injection.JBossInjectionProvider</param-value>
</context-param>
-->
<!-- JSF 2: use pages named .xhtml instead of .jsp.
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
-->
<!-- END PARAM FOR JBOSS DEPLOYMENT-->
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-managed-bean-param.xml,/WEB-INF/faces-navigation.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>blueSky</param-value>
</context-param>
<session-config>
<session-timeout>5</session-timeout>
</session-config>
</web-app>
一切都会有所帮助。谢谢:))
答案 0 :(得分:0)
我在faces-config.xml中进行了更改,它与JSF 2.2.4一起使用 我将2.1版本更新为2.2
OLD:
<faces-config
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-facesconfig_2_1.xsd"
version="2.1">
新:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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-facesconfig_2_2.xsd"
version="2.2">