You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by nanomonk <br...@inbox.ru> on 2008/04/15 11:19:21 UTC
[2.1]change response http status
I need to set another status-code via "response.setStatus(1)":
"HTTP/1.1 200 OK"
to
"HTTP/1.1 001 blablabla"
Now I have my custom serializer. How can I to take access to Response object
from serializer?
--
View this message in context: http://www.nabble.com/-2.1-change-response-http-status-tp16698263p16698263.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [2.1]change response http status
Posted by Joerg Heinicke <jo...@gmx.de>.
On 16.04.2008 07:24, nanomonk wrote:
> Hmm.. no, I need to set status code according to some events during
> executing my own serializer, for example: if all ok done - status code 1,
> some error - 2, another error - 3...
> so, can I to access to Response object from serializer(exactly via
> "response.setStatus(1)" in a code)?
> if not - maybe another true-way is exist?
Isn't the serializer rather late for such logic? Can you determine this
value beforehands, e.g. in an Action?
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: [2.1]change response http status
Posted by nanomonk <br...@inbox.ru>.
Jeroen Reijn-3 wrote:
>
> Hi,
>
> try setting the status-code attribute on your custom serializer.
>
> <map:serialize type="xml" status-code="001"/>
>
> Regards,
>
> Jeroen Reijn
>
>
>
>
> -----Original Message-----
> From: nanomonk [mailto:brain_box@inbox.ru]
> Sent: Tue 4/15/2008 11:19 AM
> To: users@cocoon.apache.org
> Subject: [2.1]change response http status
>
>
> I need to set another status-code via "response.setStatus(1)":
> "HTTP/1.1 200 OK"
> to
> "HTTP/1.1 001 blablabla"
> Now I have my custom serializer. How can I to take access to Response
> object
> from serializer?
>
> --
> View this message in context:
> http://www.nabble.com/-2.1-change-response-http-status-tp16698263p16698263.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
Hmm.. no, I need to set status code according to some events during
executing my own serializer, for example: if all ok done - status code 1,
some error - 2, another error - 3...
so, can I to access to Response object from serializer(exactly via
"response.setStatus(1)" in a code)?
if not - maybe another true-way is exist?
--
View this message in context: http://www.nabble.com/-2.1-change-response-http-status-tp16698263p16721000.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: [2.1]change response http status
Posted by Jeroen Reijn <j....@onehippo.com>.
Hi,
try setting the status-code attribute on your custom serializer.
<map:serialize type="xml" status-code="001"/>
Regards,
Jeroen Reijn
-----Original Message-----
From: nanomonk [mailto:brain_box@inbox.ru]
Sent: Tue 4/15/2008 11:19 AM
To: users@cocoon.apache.org
Subject: [2.1]change response http status
I need to set another status-code via "response.setStatus(1)":
"HTTP/1.1 200 OK"
to
"HTTP/1.1 001 blablabla"
Now I have my custom serializer. How can I to take access to Response object
from serializer?
--
View this message in context: http://www.nabble.com/-2.1-change-response-http-status-tp16698263p16698263.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org