cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya A. Kriveshko" <i...@kaon.com>
Subject Re: Redirect in XSP
Date Fri, 08 Nov 2002 15:40:34 GMT
If you want to redirect the browser to a new URL after the
pipeline has been constructed and the generation has (possibly)
started, you can do that by outputting the <META> tag in the
output HTML.

<meta http-equiv="Refresh" content="0; URL=/some/local/url"/>
or
<meta http-equiv="Refresh" content="0; URL=http://some.com/other/url"/>

"0" means no delay.
--
Ilya

Artur Bialecki wrote:

>Witold,
>
>First of all processing of XSP is done by a Generator
>which is part of pipeline *execution*. This means that
>it's too late to redirect at that point since some data
>might already been sent back to the browser (depends 
>on the size of your serializer buffer).
>
>You should only redirect during pipeline *setup*,
>before any generators are called.
>
>Assuming you using Cocoon 2.0.x you probably want write
>and Action that checks for condition that might cause
>redirection and return it as a sitemap parameter
>and use <map:redirect-to> before generation of your
>XSP.
>
>Witold & Neil
>
>Look at ServerPagesAction.java and action.xsl
>in cocoon source.
>
>Artur...
>
>
>  
>
>>-----Original Message-----
>>From: Neil A [mailto:mylists@neilabraham.co.uk] 
>>Sent: November 8, 2002 10:16 AM
>>To: cocoon-users@xml.apache.org
>>Subject: Re: Redirect in XSP
>>
>>
>>Hi all
>>
>>I joined the cocoon users list today to ask a very similar question.
>>
>>I have a list of external URLs held in XML and I have a pipeline to 
>>pick the right one.  I want to use <map:redirect-to> within the 
>>sitemap, but I can't find a way to get the URL out of XML and 
>>make it a 
>>sitemap parameter for <map:redirect-to> to use.
>>
>>Can anyone help us both?
>>
>>Thanks,
>>
>>Neil.
>>
>>
>>On Friday, November 8, 2002, at 09:41 AM, Witold TreliƱski wrote:
>>
>>    
>>
>>>Hi!
>>>
>>>I have a question. How to make o redirection in XSP from 
>>>      
>>>
>>one page to 
>>    
>>
>>>other
>>>depeneding on some code in <xsp:logic>? I tried 
>>><xsp-response:send-redirect
>>>url="any"/> and it doesn't work.
>>>
>>>WT
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>Please check that your question  has not already been 
>>>      
>>>
>>answered in the
>>    
>>
>>>FAQ before posting.     
>>>      
>>>
>><http://xml.apache.org/cocoon/faq/in> dex.html>
>>    
>>
>>>To 
>>>      
>>>
>>unsubscribe, e-mail:     
>><cocoon-users-unsubscribe@xml.apache.org>
>>    
>>
>>>For additional commands, e-mail:   
>>>      
>>>
>><cocoon-users-help@xml.apache.org>
>>    
>>
>>>      
>>>
>>---------------------------------------------------------------------
>>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:     <cocoon-users-unsubscribe@xml.apache.org>
>>For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>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:     <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>
>  
>



---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message