Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCC50EB10 for ; Fri, 25 Jan 2013 11:08:58 +0000 (UTC) Received: (qmail 21048 invoked by uid 500); 25 Jan 2013 11:08:57 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 20482 invoked by uid 500); 25 Jan 2013 11:08:49 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 20446 invoked by uid 99); 25 Jan 2013 11:08:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jan 2013 11:08:47 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of todor.dimitrov@me.com designates 17.158.42.247 as permitted sender) Received: from [17.158.42.247] (HELO nk11p07mm-asmtp002.mac.com) (17.158.42.247) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jan 2013 11:08:39 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [192.168.1.13] (dsdf-4db5fe88.pool.mediaWays.net [77.181.254.136]) by nk11p07mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MH600LJTHLS4O20@nk11p07mm-asmtp002.mac.com> for users@myfaces.apache.org; Fri, 25 Jan 2013 11:08:19 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327,1.0.431,0.0.0000 definitions=2013-01-25_04:2013-01-25,2013-01-25,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1301250042 From: "todor.dimitrov" Subject: "ExternalContext#responseSendError" does not interrupt JSF Lifecycle Message-id: Date: Fri, 25 Jan 2013 12:08:15 +0100 To: users@myfaces.apache.org X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on apache.org 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