Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0901291CA for ; Wed, 4 Apr 2012 14:08:21 +0000 (UTC) Received: (qmail 66084 invoked by uid 500); 4 Apr 2012 14:08:19 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 66060 invoked by uid 500); 4 Apr 2012 14:08:19 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 66049 invoked by uid 99); 4 Apr 2012 14:08:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 14:08:19 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2012 14:08:14 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SFQsK-0006ly-Gu for users@wicket.apache.org; Wed, 04 Apr 2012 07:07:52 -0700 Date: Wed, 4 Apr 2012 07:07:52 -0700 (PDT) From: jarnis To: users@wicket.apache.org Message-ID: <1333548472505-4531970.post@n4.nabble.com> Subject: Fallback for error page MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi all I set up an error page by calling getApplicationSettings().setInternalErrorPage(ErrorPage.class); in my application setup. However, I would like to redirect to a static html page (not a wicket page) if an error occurs, preventing the wicket error page from being shown. I thought about wrapping all code in the error page in a try/catch block and throwing a custom RuntimeException if any exception is thrown on the error page. I could then setup a custom page with redirection as the error page for this specific exception. An even simpler solution would be to just redirect to the static page in the catch block. The main problem with this approach is that I can't wrap the call to the parent class' constructor in the try block. Any exception being thrown in the parent constructor would therefore still result in a loop of error page redirecting to itself, same as with no fallback. Is there a good solution to this problem? Thanks in advance, Jarnis Bertelsen -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Fallback-for-error-page-tp4531970p4531970.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org