You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2002/03/27 16:24:43 UTC

New : internal redirects with "cocoon:" URIs

Hi team,

I implemented internal redirects using the "cocoon:" pseudo-protocol. 
This is the Cocoon-equivalent to servlet request forwarding.

This means that writing
  <map:match pattern="">
    <map:redirect-to uri="cocoon:/index.html"/>
  </map:match>
will make a recursive call on the current processor to serve 
"index.html" without going back to the client browser.

This is also available in the Redirector used by actions. And as usual, 
"cocoon:/xxx" uses the current sitemap, and "cocoon://xxx" uses the root 
sitemap.

This feature will be especially usefull with the flow engine, since the 
flow script chooses the page that comes next and should be able to call 
this page without losing business data that may be stored as request 
attributes.

This is implemented in org.apache.cocoon.environment.ForwardRedirector 
and used for now only by the treeprocessor (so I didn't update the 
samples to avoid to break them). Integration with the compiled engine 
should be fairly easy, but I'm sooo late on my paid work, so any takers 
are welcome.

Enjoy,
Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: New : internal redirects with "cocoon:" URIs

Posted by Stefano Mazzocchi <st...@apache.org>.
Jeremy Quinn wrote:
> 
> At 4:24 pm +0100 27/3/02, Sylvain Wallez wrote:
> >Hi team,
> >
> >I implemented internal redirects using the "cocoon:" pseudo-protocol.
> >This is the Cocoon-equivalent to servlet request forwarding.
> >
> >This means that writing
> >  <map:match pattern="">
> >    <map:redirect-to uri="cocoon:/index.html"/>
> >  </map:match>
> >will make a recursive call on the current processor to serve
> >"index.html" without going back to the client browser.
> >
> >This is also available in the Redirector used by actions. And as usual,
> >"cocoon:/xxx" uses the current sitemap, and "cocoon://xxx" uses the root
> >sitemap.
> >
> >This feature will be especially usefull with the flow engine, since the
> >flow script chooses the page that comes next and should be able to call
> >this page without losing business data that may be stored as request
> >attributes.
> >
> >This is implemented in org.apache.cocoon.environment.ForwardRedirector
> >and used for now only by the treeprocessor (so I didn't update the
> >samples to avoid to break them). Integration with the compiled engine
> >should be fairly easy, but I'm sooo late on my paid work, so any takers
> >are welcome.
> >
> >Enjoy,
> 
> Very Cool!

Indeed! way cool, I've been missing this for so long now :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: New : internal redirects with "cocoon:" URIs

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 4:24 pm +0100 27/3/02, Sylvain Wallez wrote:
>Hi team,
>
>I implemented internal redirects using the "cocoon:" pseudo-protocol.
>This is the Cocoon-equivalent to servlet request forwarding.
>
>This means that writing
>  <map:match pattern="">
>    <map:redirect-to uri="cocoon:/index.html"/>
>  </map:match>
>will make a recursive call on the current processor to serve
>"index.html" without going back to the client browser.
>
>This is also available in the Redirector used by actions. And as usual,
>"cocoon:/xxx" uses the current sitemap, and "cocoon://xxx" uses the root
>sitemap.
>
>This feature will be especially usefull with the flow engine, since the
>flow script chooses the page that comes next and should be able to call
>this page without losing business data that may be stored as request
>attributes.
>
>This is implemented in org.apache.cocoon.environment.ForwardRedirector
>and used for now only by the treeprocessor (so I didn't update the
>samples to avoid to break them). Integration with the compiled engine
>should be fairly easy, but I'm sooo late on my paid work, so any takers
>are welcome.
>
>Enjoy,

Very Cool!

Thanks Sylvain.


regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pa...@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: New : internal redirects with "cocoon:" URIs

Posted by Stuart Roebuck <st...@adolos.co.uk>.
On Wednesday, March 27, 2002, at 05:23 PM, Torsten Curdt wrote:

>> Hi team,
>>
>> I implemented internal redirects using the "cocoon:" pseudo-protocol.
>> This is the Cocoon-equivalent to servlet request forwarding.
>>
>> This means that writing
>>   <map:match pattern="">
>>     <map:redirect-to uri="cocoon:/index.html"/>
>>   </map:match>
>> will make a recursive call on the current processor to serve
>> "index.html" without going back to the client browser.
>>
>> This is also available in the Redirector used by actions. And as usual,
>> "cocoon:/xxx" uses the current sitemap, and "cocoon://xxx" uses the 
>> root
>> sitemap.
>
> Very cool!
> --
> Torsten

Very cool indeed!

Thank you,

Stuart.

            Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
      Key fingerprint = 89D9 E405 F8B1 9B22 0FA2  F2C1 9E57 5AB1 88DD 65AF
-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Systems Architect                             Java, XML, MacOS X, XP, 
etc.
ADOLOS                                           <http://www.adolos.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: New : internal redirects with "cocoon:" URIs

Posted by Torsten Curdt <tc...@dff.st>.
> Hi team,
>
> I implemented internal redirects using the "cocoon:" pseudo-protocol.
> This is the Cocoon-equivalent to servlet request forwarding.
>
> This means that writing
>   <map:match pattern="">
>     <map:redirect-to uri="cocoon:/index.html"/>
>   </map:match>
> will make a recursive call on the current processor to serve
> "index.html" without going back to the client browser.
>
> This is also available in the Redirector used by actions. And as usual,
> "cocoon:/xxx" uses the current sitemap, and "cocoon://xxx" uses the root
> sitemap.

Very cool!
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: New : internal redirects with "cocoon:" URIs

Posted by Berin Loritsch <bl...@apache.org>.
Just keep in mind that the new page has the same
external URI as the page that referred it.

> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain.wallez@anyware-tech.com] 
> Sent: Wednesday, March 27, 2002 10:25 AM
> To: cocoon-dev@xml.apache.org
> Subject: New : internal redirects with "cocoon:" URIs
> 
> 
> Hi team,
> 
> I implemented internal redirects using the "cocoon:" pseudo-protocol. 
> This is the Cocoon-equivalent to servlet request forwarding.
> 
> This means that writing
>   <map:match pattern="">
>     <map:redirect-to uri="cocoon:/index.html"/>
>   </map:match>
> will make a recursive call on the current processor to serve 
> "index.html" without going back to the client browser.
> 
> This is also available in the Redirector used by actions. And 
> as usual, 
> "cocoon:/xxx" uses the current sitemap, and "cocoon://xxx" 
> uses the root 
> sitemap.
> 
> This feature will be especially usefull with the flow engine, 
> since the 
> flow script chooses the page that comes next and should be 
> able to call 
> this page without losing business data that may be stored as request 
> attributes.
> 
> This is implemented in 
> org.apache.cocoon.environment.ForwardRedirector 
> and used for now only by the treeprocessor (so I didn't update the 
> samples to avoid to break them). Integration with the compiled engine 
> should be fairly easy, but I'm sooo late on my paid work, so 
> any takers 
> are welcome.
> 
> Enjoy,
> Sylvain
> 
> -- 
> Sylvain Wallez
>   Anyware Technologies                  Apache Cocoon
>   http://www.anyware-tech.com           mailto:sylvain@apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org