RE: redirect problem
"Anthony Eden" <[email protected]> Sun, 1 Dec 2002 16:55:58 -0500
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <000101c29984$6e59b1e0$0501000a@mobile1> |
Yes, use the standard servlet method:
RequestDispatcher dispatcher = request.getRequestDispatcher("bla.html");
dispatcher.forward(request, response);
I have also fixed the post evaluation problem by putting it in the finally part of the catch/try block which surrounds that whole section of the servlet. This assures that post evaluation actions are always executed.
Sincerely,
Anthony Eden
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of Florian Gnägi
> Sent: Thursday, November 28, 2002 5:38 AM
> To: [email protected]
> Subject: [JPublish-developer] redirect problem
>
>
> Hi
>
> Currently we realized that
>
> context.put("redirect","bla.hml");
>
> does acutally send a http 'Document has moved' header and
> does not internally forward the request to another page
> within the same jPublishContext. This means that every page
> that uses the formproc module generates the doubled amount of
> browser requests while filling out forms.
>
> Shouldn't there also be a way of internally forward from one
> page to another one?
>
> When looking at the jPublish servlet we discovered that in
> case of a redirect all post evaluation actions would *not* be
> evaluated at all. I consider this as a bug. Otherwhise post
> evaluation actions can't be used to clean up stuff since one
> never knows in advance if they will really get executed or
> not. The following patch solves this issue. What do you think?
>
> 352c352,353
> < if(optionalRedirect(page.executeActions(context), path,
> response))
> ---
> > if(optionalRedirect(page.executeActions(context), path,
> response)){
> > executePostEvaluationActions(request, response, context, path);
> 353a355
> > }
>
>
> Sincerly
> -florian
>
>
>
>
> Florian Gnägi <[email protected]> http://www.olat-zentrum.unizh.ch
>
> Center for Computing Services
> OLAT-Zentrum
> University of Zurich Phone: +41 1 63 56788
> Winterthurerstrasse 190
> CH-8057 Zuerich FAX: +41 1 63
> 54505N¬HY޵隊X¬²š'²ŠÞu¼†zÛazw°=©fNéà²×§N§v¥tú0z°¨–Šâ§(š–œ
> ¶È³zm§ÿÚvË(º·~ŠàzwýÈ"n)ÿçbç-¦ZZ–m4Óg§&››–+!uëÞ–Š^®f¢–)à–+
> -&››–+!uëÞ–Š^®X¬¶Ë(º·~Šàzw†Ûi³ÿåŠËl²‹«qçè® §zßåŠËlþX¬¶)ߣøé¹¹b²^½éh
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf