You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@anyware-tech.com> on 2003/11/17 17:08:22 UTC
Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/fom
FOM_Cocoon.java
unico@apache.org wrote:
>unico 2003/11/14 10:58:18
>
> Modified: src/java/org/apache/cocoon/components/flow/javascript/fom
> FOM_Cocoon.java
> Log:
> add cocoon.sendStatus and cocoon.response.setStatus methods to FOM
>
>
<snip/>
> +
> + public void jsFunction_setStatus(int sc) {
> + if (response instanceof HttpResponse) {
> + ((HttpResponse) response).setStatus(sc);
> + }
> + }
> +
>
>
Why do we need a setStatus() on the response in the flow?
Setting the status should IMO be available only by sending an empty
response with redirector.sendStatus(), or through the "status-code"
attribute on <map:read> and <map:serialize>.
Moreover, this introduces a dependency on the http environment, which
isn't good.
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