bonjour à tous.
J'ai voulu faire une migration de mon application qui marchait avec jsf1.2 vers jsf2.1.1 FCS mais il me marque une erreur avec le viewhandler
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| GRAVE: Servlet.service() for servlet [faces Servlet] in context with path [/supervisionJSF] threw exception [Tentative non autorisée de définition de ViewHandler après la restitution dune réponse.] with root cause
java.lang.IllegalStateException: Tentative non autorisée de définition de ViewHandler après la restitution dune réponse.
at com.sun.faces.application.ApplicationImpl.setViewHandler(ApplicationImpl.java:562)
at org.ajax4jsf.event.InitPhaseListener.beforePhase(InitPhaseListener.java:92)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
...
14:46:18,113 ERROR [org.ajax4jsf.webapp.BaseXMLFilter] Exception in the filter chain
javax.servlet.ServletException: Tentative non autorisée de définition de ViewHandler après la restitution dune réponse.
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:422)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter ...
Caused by: java.lang.IllegalStateException: Tentative non autorisée de définition de ViewHandler après la restitution dune réponse.
at com.sun.faces.application.ApplicationImpl.setViewHandler(ApplicationImpl.java:562)... |
voici mon web.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| <?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_2_5.xsd" version="2.5">
<display-name>Supervision JSF</display-name>
<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>contextConfigLocation</param-name>
<param-value>classpath:application-context*.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/springsecurity.taglib.xml</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
<param-value>true</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>filtre richface</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>filtre richface</filter-name>
<servlet-name>faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<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>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app> |
apparement j'ai comme l'impression que c'est le parametre
<context-param><param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name><param-value>true</param-value></context-param>
qui pose probleme mais vu que si on ne le met pas le serveur ne demarre pas.
Quelqu'un peut il maider SVP ...
Partager