cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: [VOTE RESULTS] FOM sendStatus/setStatus
Date Mon, 10 Nov 2003 11:11:24 GMT


> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain@apache.org]
> Sent: maandag 10 november 2003 11:50
> To: dev@cocoon.apache.org
> 
> Unico Hommes wrote:
> 
> >Unico Hommes wrote:
> >
> >
> >>- cocoon.sendStatus(status)
> >>- cocoon.sendStatus(status, message)
> >>- cocoon.response.setStatus(status)
> >>- cocoon.response.setStatus(status,message)
> >>
> >>
> >
> >The vote passed. (I think) I counted 6 positive votes and no negative
> ones. I will be making the changes right after the code freeze.
> >
> >
> 
> Just a remark: what's the difference between cocoon.sendStatus and
> response.setStatus? 

sendStatus also commits the response. Doing a sendPage after a
sendStatus will be an error. This also means that it effectively sends
an empty response.

setStatus does not commit the response. One must still do a sendPage.

> Furthermore, I would like this feature to be defined
> at the environment level and not only in the flowscript. Methods of
the
> "cocoon" object should just be wrappers around features available also
> in regular Java code.
> 

These methods already exist on the environment objects:

See HttpEnvironment.setStatus(), HttpResponse.setStatus() and
HttpResponse.sendError().

Unico

> Sylvain
> 
> --
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
> Orixo, the opensource XML business alliance  -  http://www.orixo.com
> 
> 



Mime
View raw message