myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "todor.dimitrov" <>
Subject "ExternalContext#responseSendError" does not interrupt JSF Lifecycle
Date Fri, 25 Jan 2013 11:08:15 GMT

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
		try {
			externalContext.responseSendError(HttpServletResponse.SC_NOT_FOUND, null);
		} catch (IOException ex) {
			throw new RuntimeException(ex);

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?



View raw message