You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Artur Bialecki <ar...@digitalfairway.com> on 2002/11/04 20:00:17 UTC

ForwardRedirector ???


Is there a way to redirect internally (without going back to the browser)
from an action? Actions get a Redirector but it is a SitemapRedirector
that calls HttpEnvironment.redirect(). Is there any way
I can get a ForwardRedirector in my action.

Thanks,


Artur...


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: ForwardRedirector ???

Posted by Artur Bialecki <ar...@digitalfairway.com>.
> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org] 

> Artur Bialecki wrote:
> > 
> > Is there a way to redirect internally (without going back 
> to the browser)
> > from an action? Actions get a Redirector but it is a 
> SitemapRedirector
> > that calls HttpEnvironment.redirect(). Is there any way
> > I can get a ForwardRedirector in my action.
> 
> The best way is to exit the action and redirect in the 
> sitemap, so that 
> you can easily modify it later, and your Action becomes more reusable.
> 
> All URL contracts /should/ be in the sitemap.

Unfortunately (well not really) I started with Cocoon 1
and had *lots* of man-hours invested in XSP pages that
talk to EJBs and have lost of logic (in logicsheets).
When I moved to Cocoon 2.0.3 I did not want to redo
all of the XSPs because: 1. I had no time, 2. Cocoon 2.1 is
coming and it has cool new things as well as it changes
some other things again.
So now I have an action that processes XSP and stores
results in request attribute. This action does many things
including handling any errors which involves redirection.

Currently I use external redirection from that action
but I would like to redirect internally instead. So if
there is a way of doing internal redirection from the 
act() method please let me know.

Thanks,

Artur...






---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: ForwardRedirector ???

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Artur Bialecki wrote:
> 
> Is there a way to redirect internally (without going back to the browser)
> from an action? Actions get a Redirector but it is a SitemapRedirector
> that calls HttpEnvironment.redirect(). Is there any way
> I can get a ForwardRedirector in my action.

The best way is to exit the action and redirect in the sitemap, so that 
you can easily modify it later, and your Action becomes more reusable.

All URL contracts /should/ be in the sitemap.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>