jsf - IllegalStateException: Illegal attempt to set ViewHandler after a response has been rendered -


I am migrating JSF 1.0 to JSF 2.2.

I have found the following error when trying to run my app:

The invalid attempt to set the viewhandler after the JSP error page response has been attempted. | Java.lang.IllegalStateException: Invalid attempt to set ViewHandler after response.

After reading some solution to the problem, I think it is a matter of definition of a view-operator, rather than what should be written in faces-config.xml :

  & lt; View-Operator & gt; Org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl & lt; / View-handler & gt; ? Obviously, if this is not a problem then I would be happy to hear it too.   

java.lang.IllegalStateException: invalid attempt to set ViewHandler after a response is.

This exception occurs when any attempt is made Programmatic a ViewHandler below after set, the application has already served the first request / response:

  reference .getApplication (). SetViewHandler (new SomeViewHandler ());  

This is for any & lt; View-handler & gt; is not related to faces-config.xml in the entry. Some other component library should do this, except for the Richfasses 3.x, known for doing this (and this question has been confirmed as per the comment). You have to upgrade it to JSF 2.x compatible version, at least that's Richface 4.x.

Also see:


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -