Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@minotaur.apache.org Received: (qmail 30843 invoked from network); 25 Jun 2009 21:07:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 21:07:31 -0000 Received: (qmail 10185 invoked by uid 500); 25 Jun 2009 21:07:41 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 10171 invoked by uid 500); 25 Jun 2009 21:07:41 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 10161 invoked by uid 99); 25 Jun 2009 21:07:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 21:07:41 +0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DATE_IN_PAST_03_06,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [89.105.122.83] (HELO mail.quru.com) (89.105.122.83) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 21:07:30 +0000 Received: from [192.168.248.2] (unknown [195.54.230.220]) by mail.quru.com (Postfix) with ESMTP id 89E051A241F1 for ; Thu, 25 Jun 2009 22:07:07 +0100 (BST) Message-Id: <4C766828-3018-4E6A-B6CF-61F0FACA88FC@quru.com> From: Roland Whitehead To: jspwiki-user@incubator.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Redirect in a FormHandler Date: Thu, 25 Jun 2009 18:13:35 +0100 References: X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org We've tried throwing a RedirectException but a formhandler is actually defined as a plugin and plugins will only throw PluginExceptions. As RedirectExceptions are acutally WikiExceptions (and thus on a different fork to pluginExceptions) it just won't compile. We're going to have a crack at writing to the header of the page and see what we can do. It seems very odd that the formplugin does not allow you to redirect to a different page according to success or failure - we rather think that this is one of the more obvious things that it should do. Perhaps we shouldn't be building this functionality into our handler but more into the formplugin. Does anyone else have a view on this? Roland -- QURU Ltd, London On 23 Jun 2009, at 21:51, Janne Jalkanen wrote: > > Throwing a RedirectException does not work? > > You could, of course, also use TemplateManager.requestResource() to > write Javascript into the directly. > > /Janne > > On 22 Jun 2009, at 20:48, Roland Whitehead wrote: > >> We've done a some work on the FormMailer FormHandler and have >> wrapped it into a jar file and generally tidied it up. We've been >> asked to add a redirect on success (similar to the original >> FormMail.pl cgi). Has anyone done a redirect from within a >> FormHandler? We've tried to trick it by outputting some javascript >> to redirect the current browser window to a new relative URL but >> this doesn't work - the javascript isn't even rendered. Any >> suggestions? >> >> >> Roland >> -- >> QURU Ltd, London > >