cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric SCHAEFFER" <eschaef...@posterconseil.com>
Subject Re: HTTP headers (redirect and so on..)
Date Mon, 31 Jan 2000 17:13:45 GMT
Youps, sorry. I misunderstood something (+ I thought that if the document
was null in Engine.java, it could raise an NullPointerException or something
like that).
I'm confused...

(But you don't return null, you set the document variable to null in your
XSP page because the populateDocument function doesn't return anything.)

But I've got another problem : XSP pages are compiled and cached in the
repository. They can be recovered by their URL. Good.
But what if it's my producer that return different XML documents depending
on the context ?
I wrote a producer that perform some verifications before reading the XML
file, and redirect the client to another URL when a error occures.
As the producers can't write directly in the response object, my producer
return an XML document to perform the redirect. If I return an XSP page, and
if it's already catched, it isn't recompiled and no redirect is performed...


My question is : why producers can't have access to the response object ?

Eric.


_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059

----------------------------------------------------------------------------
-----------------------------
 Come to the first official Apache Software Foundation Conference!
-----------------------------------
http://ApacheCon.Com ------------------------------------
_______________________________________

----- Original Message -----
From: Mike Engelhart <mengelhart@earthtrip.com>
To: <cocoon-dev@xml.apache.org>
Sent: Monday, January 31, 2000 4:53 PM
Subject: Re: HTTP headers (redirect and so on..)


> Eric SCHAEFFER wrote:
>
> > I've been using XSP for just 1 week (before I used DCP).
> >
> > But how do you stop Cocoon processing ? You write the redirect code at
the
> > top of the file (before other PIs) ?
> >
> > I still believe that we need to modify the Engine class... (signal that
stop
> > the Cocoon processing)
> >
> > Eric.
> As I said, just put a "return null;" after the sendRedirect() call.  That
> effectively ends that Producer's getDocument() call which is what is being
> processed?
>
> As I said in the other post, I'm not sure what you mean about other PI's??
>


Mime
View raw message