You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Adrian Geissel <ag...@zenark.com> on 2001/10/15 13:20:32 UTC

[C2.0rc1]: Redirects and Requests - passing parameters

Hi.,

Got a question about constructing a particular site-map process flow.

What we are trying to achieve is the following:

Present a form to the user
Process the request with parameters in an Action
On Success - redirect to the next logical page (not a problem)
On Fail - we want to redirect back to the original form, passing the request
parameters (for field re-population) and an error message.

I have looked, but not found, how to pass the original request object to a
redirect target (so that getParameter() and getAttribute() work).
Is this possible? If so, how is the sitemap configured? If not, does anyone
have experience of doing something similar?

Possibly related is how the internal 'cocoon:' redirect protocol works.

Many thanks,
Adrian



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

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


Cocoon Website

Posted by Jesse Reynolds <li...@va.com.au>.
Hi

It seems that the Cocoon website is often incredibly slow to respond. 
It also seems to suffer from way too many graphics, and bad 
javascript.

Right now, for instance, the server is randomly refusing connections outright.

Can I help with the website please? I'd happily host a mirror in 
Australia on a fast server on a fast connection, as well as assist 
with a redesign focusing on a 'lighter' site...

I don't know who updates the site or whatever, but if I can be of any 
use, please let me know. I'd be happy to help out.

Cheers

Jesse

-- 

       Jesse Reynolds - Virtual Artists Pty Ltd - http://www.va.com.au
                                                  jesse (at) va.com.au

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

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


Re: [C2.0rc1]: Redirects and Requests - passing parameters

Posted by Adrian Geissel <ag...@zenark.com>.
Thanks Carsten,

This has clarified the situation with respect to request-object - and the
ability to 'fall-through' to an internal request using the cocoon: protocol
has tidied up my sitemap no end (not big - yet!).

Cheers
Adrian
C2 - The Bee's Knees!

----- Original Message -----
From: Carsten Ziegeler <cz...@sundn.de>
To: <co...@xml.apache.org>
Sent: Monday, October 15, 2001 2:10 PM
Subject: AW: [C2.0rc1]: Redirects and Requests - passing parameters


> Hi Adrian,
>
> > -----Ursprüngliche Nachricht-----
> > Von: Adrian Geissel [mailto:ageissel@zenark.com]
> > Gesendet: Montag, 15. Oktober 2001 13:21
> > An: cocoon-users@xml.apache.org
> > Betreff: [C2.0rc1]: Redirects and Requests - passing parameters
> >
> >
> > Hi.,
> >
> > Got a question about constructing a particular site-map process flow.
> >
> > What we are trying to achieve is the following:
> >
> > Present a form to the user
> > Process the request with parameters in an Action
> > On Success - redirect to the next logical page (not a problem)
> > On Fail - we want to redirect back to the original form, passing
> > the request
> > parameters (for field re-population) and an error message.
> >
> > I have looked, but not found, how to pass the original request object to
a
> > redirect target (so that getParameter() and getAttribute() work).
> > Is this possible? If so, how is the sitemap configured? If not,
> > does anyone
> > have experience of doing something similar?
> >
> Using redirects is not possible, as you can't "redirect" the attributes.
> One solution would be to use sessions and to store your information
> there.
>
> > Possibly related is how the internal 'cocoon:' redirect protocol works.
> Yes, the cocoon: protocol works this way and that is exactly another
> solution you could use:
> <map:match pattern="start"/>
> <map:act type="YOURACTION">
>   <!-- success -->
>   <map:generate src="cocoon:next-page"/>
>   <map:serialize type="html"/>
> </map:act>
> <!-- fail -->
>   <map:generate src="cocoon:fail-page"/>
>   <map:serialize type="html"/>
> </map:match>
>
> <map:match pattern="next-page"/>
>    <!-- your next page -->
> </map:match>
>
> <map:match pattern="fail-page"/>
>    <!-- your form page -->
> </map:match>
>
> Your pipeline "start" is invoked by the form, your action tests
> the values. if successfull, the internal cocoon: protocol is
> used to process the request. The next-page pipeline
> is invoked and gets all parameters and attributes the original
> "start" pipeline got.
> The Same applies to the fail-page.
>
> HTH
>
> Carsten
> >
> > Many thanks,
> > Adrian
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>



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

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


AW: [C2.0rc1]: Redirects and Requests - passing parameters

Posted by Carsten Ziegeler <cz...@sundn.de>.
Hi Adrian,

> -----Ursprüngliche Nachricht-----
> Von: Adrian Geissel [mailto:ageissel@zenark.com]
> Gesendet: Montag, 15. Oktober 2001 13:21
> An: cocoon-users@xml.apache.org
> Betreff: [C2.0rc1]: Redirects and Requests - passing parameters
>
>
> Hi.,
>
> Got a question about constructing a particular site-map process flow.
>
> What we are trying to achieve is the following:
>
> Present a form to the user
> Process the request with parameters in an Action
> On Success - redirect to the next logical page (not a problem)
> On Fail - we want to redirect back to the original form, passing
> the request
> parameters (for field re-population) and an error message.
>
> I have looked, but not found, how to pass the original request object to a
> redirect target (so that getParameter() and getAttribute() work).
> Is this possible? If so, how is the sitemap configured? If not,
> does anyone
> have experience of doing something similar?
>
Using redirects is not possible, as you can't "redirect" the attributes.
One solution would be to use sessions and to store your information
there.

> Possibly related is how the internal 'cocoon:' redirect protocol works.
Yes, the cocoon: protocol works this way and that is exactly another
solution you could use:
<map:match pattern="start"/>
<map:act type="YOURACTION">
  <!-- success -->
  <map:generate src="cocoon:next-page"/>
  <map:serialize type="html"/>
</map:act>
<!-- fail -->
  <map:generate src="cocoon:fail-page"/>
  <map:serialize type="html"/>
</map:match>

<map:match pattern="next-page"/>
   <!-- your next page -->
</map:match>

<map:match pattern="fail-page"/>
   <!-- your form page -->
</map:match>

Your pipeline "start" is invoked by the form, your action tests
the values. if successfull, the internal cocoon: protocol is
used to process the request. The next-page pipeline
is invoked and gets all parameters and attributes the original
"start" pipeline got.
The Same applies to the fail-page.

HTH

Carsten
>
> Many thanks,
> Adrian
>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


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

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