cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: redirect
Date Tue, 01 Feb 2000 14:54:39 GMT
Eric SCHAEFFER wrote:
> 
> Youps, very strange.
> Note on Cocoon functionment :
> 
> Request => Producer : XML document => Processors (loop) => Formatters (loop)
> => Response
> 
> The way your XML document is created shouldn't change the problem...
> 
> I suppose you use Cocoon 1.6.1, Xerces 1.1, Xalan 0.19.2 ...
> Have you 'register' the redirect processor in cocoon.properties ? (add the
> line processor.type.redirect=class)
> Note: my redirect processor belong to the
> 'org.apache.cocoon.processor.redirect' package. It can (and should) be
> changed, otherwise, you should place it in the jar file...
> 
> But you can do redirect also in XSP.
> Just write an XSP page like this :
> 
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> 
> <xsp:page
>     language="java"
>     xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> >
> 
>     <xsp:logic>
>  response.sendRedirect("/test.xml");
>  document = null;
>  return;
>     </xsp:logic>
> 
> </xsp:page>

???

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>

<xsp:page
    language="java"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
  <xsp:logic>
   response.sendRedirect("/test.xml");
  </xsp:logic>
</xsp:page>

the above should be enough. (if not, it's a bug)

> My processor is not really a good solution, because it parses the document
> to found a redirect pi. If you don't have one, it consums time for nothing.
> XSP is better (pages are transformed in java classes, compiled and then
> executed to produce the XML document).
> 
> And if you want to create dynamic pages, DCP is dying... Have a look at XSP.
> Really cool. You can create tag libraries, and then there's no XSP code in
> any XML file.

Yes, Eric is right. I suggest all of you to forget about DCP since it
will be deprecated in future releases (starting from 1.7 probably).

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message