We are migrating the JSF 1.1 project (MyFaces) to JSF 2. The idea is to periodically migrate, supporting both JSP and XHTML for some time. We use a lot of ajax4jsf-1.1.1 tags in JSP pages. We do not use RichFaces. After setting up the system on JSF 2 (with all the configuration changes mentioned in the tutorial from Balusc) When you tried to access the JSP page using ajax4jsf.jar in the classpath, we get an exception:
Caused by: java.lang.IllegalStateException: setViewHandler may not be executed after a lifecycle request has been completed at org.apache.myfaces.application.ApplicationImpl.setViewHandler(ApplicationImpl.java:853) at org.ajax4jsf.framework.ajax.InitPhaseListener.beforePhase(InitPhaseListener.java:92) at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:131)
It seems that ajax4jsf.jar is not compatible with JSF 2. It causes some configuration problems with LifeCycle.
Is there a way to make a4j work with JSP 2 JSP? I know when we use XHTML, we donβt need it.
source share