You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Shaw, Chris" <Ch...@ecb.int> on 2002/07/01 09:01:56 UTC

RE: Redirect to referrer

Thanks (again) for the reply...it's taught me some new things that might
come in handy later on.

But in the short-term this doesn't solve the problem - when re-directing it
means that all the values in my Request object are lost, so when I use
<xsp-request:get-parameter> in my XSP page I don't get any data.

Unless there is a magic tag to include them in the re-direction, I will have
to go along with your original suggestion....

Regards

Chris
-=-=-=



-----Original Message-----
From: Christian Haul [mailto:haul@dvs1.informatik.tu-darmstadt.de]
Sent: 28 June 2002 18:10
To: cocoon-users@xml.apache.org
Subject: Re: Redirect to referrer


On 28.Jun.2002 -- 05:58 PM, Shaw, Chris wrote:
> 
> PS - I'm surprised there isn't a simpler solution to do this, when it must
> be a fairly common thing.....
> 

How about this one, then?

       <map:match pattern="store">
           <map:act type="persist-action"> 
		    <map:match type="referer-match" pattern="**">
               <map:redirect-to uri="{1}"/>
            </map:match>
           </map:act> 
       </map:match>   

Or, using HEAD:

       <map:match pattern="store">
           <map:act type="persist-action"> 
              <map:redirect-to uri="{header:referer}"/>
           </map:act> 
       </map:match>   

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
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>

Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement.
This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited.
If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system.


---------------------------------------------------------------------
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: Redirect to referrer

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 01.Jul.2002 -- 09:01 AM, Shaw, Chris wrote:
> Thanks (again) for the reply...it's taught me some new things that might
> come in handy later on.

You're welcome.

> But in the short-term this doesn't solve the problem - when re-directing it
> means that all the values in my Request object are lost, so when I use
> <xsp-request:get-parameter> in my XSP page I don't get any data.
> 
> Unless there is a magic tag to include them in the re-direction, I will have
> to go along with your original suggestion....

Sorry, that is not possible.

Redirect-to send a redirect message to the client which in turn loads
a new URL (have a look at the URL line of your browser!)

  client                 cocoon
    -----request A-------->
    <----redirect to B----
    -----request B-------->
    <----response for B---

Therefore you'd need to store the data in a session or encode it into
the URL. There are might be an action for this.
(There's at least a "TestAction" in scratchpad, that copies all
parameters from a given InputModule -- e.g. request -- to a given
OutputModule -- e.g. session -- that will help. OTOH that was created
to test and illustrate those modules and is not tuned performancewise.)

Calls OTOH work like

   client               cocoon
     ----request A------->
                      (resource)
     <---response for A--

Thus parameters are available.

In CVS HEAD a new concept exists, a flowmap/script that makes it way
easier to express such flows. But it is at best alpha.

	Chris.

Please follow up summarizing your problem and which suggested solution /
information worked for you. Add "SUMMARY: " to the subject line. This
will make FAQ generation and searching the list easier. In addition,
it makes helping you more fun. Thank you.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


---------------------------------------------------------------------
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>