title: Problems with redirect after catching Exception
body: <p>I have a problem with the redirect in my custom ExceptionHandler. The ExceptionHandler should handle NullPointerExceptions and perform a redirect if an exception occures. Here is the part of the Handler that is responsible for the redirect:</p>
  
  <pre><code>FacesContext fc = FacesContext.getCurrentInstance();
  NavigationHandler nav = fc.getApplication().getNavigationHandler();
  nav.handleNavigation(fc, null, "error" );
  </code></pre>
  
  <p>I have a simple page to test the ExceptionHandler:</p>
  
  <pre><code>&lt;h:outputText value="#{requestTestBean.firstname}" /&gt;
  </code></pre>
  
  <p>And in the getter-Method for firstname I force a NullPointerException:</p>
  
  <pre><code>Object x = null;
  x.toString();
  </code></pre>
  
  <p>The redirect to my error page works fine for this little example but when I add considerable more content on the page (like a menu with many entries and icons) the redirect doesn't work because the response is already commited in the exceptionHandler method. I also tried to redirect to the error page via response.sendRedirect() but the same problems occured.</p>
  
  <p>Why is the response already commited? Is there any context-param or anything else to prevent this behavior?</p>
  
  <p>Thanks</p>