Menu
  • HOME
  • TAGS

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

jsf,jsf-2.2,faces-config,viewhandler

java.lang.IllegalStateException: Illegal attempt to set ViewHandler after a response has been rendered. This exception will occur when an attempt is made to programmatically set a ViewHandler like below after the application has already served the first request/response: context.getApplication().setViewHandler(new SomeViewHandler()); This is thus not related to any <view-handler> entry in...

Distinguish view from normal view in ViewHandler#createView()

jsf,custom-error-pages,viewhandler

When the servlet container dispatches to an error page, it will set a bunch of special error page related attributes in the current HTTP servlet request. The keys are identified by those ERROR_XXX constant field values in RequestDispatcher class. Among others, the original request URI for which the error page...