I just found out that the test method of the bean is called during the RENDER_RESPONSE phase. This of course explains the observed behavior.
Mystery solved :) On 25.01.2013, at 12:08, "todor.dimitrov" <[email protected]> wrote: > Hi, > > I'm using the "ExternalContext#responseSendError" inside a Bean method like > this: > > public void test() { > // some logic > > final FacesContext facesContext = > FacesContext.getCurrentInstance(); > final ExternalContext externalContext = facesContext > .getExternalContext(); > try { > > externalContext.responseSendError(HttpServletResponse.SC_NOT_FOUND, null); > } catch (IOException ex) { > throw new RuntimeException(ex); > } > facesContext.responseComplete(); > } > > The JSF Lifecycle is not interrupted such that validation and rendering for > the current view are still taking place. Is this the expected behavior? Is > there a way to just abandon processing altogether as soon as > "ExternalContext#responseSendError" is called? > > > Regards, > > Todor > > >

