users@jsr311.java.net

JAXRS Response and status code

From: Sergey Beryozkin <sberyozk_at_progress.com>
Date: Mon, 23 Mar 2009 18:46:17 -0000

Hi

Section 3.3.3 in JAXRS 1.0 specification says that
"A null return value results in a 204 status code (1). If the status property of the Response is not set : a 200 status code is used
for a non-null entity property (2) and a 204 status code is used if the entity property is null (3) "

I've added (1), (2), (3)

(1) is clear to me, but I'm confused about (2) & (3) in that I don't see a method in Response which would not set a status
code, directly or indirectly, when creating a ResponseBuilder instance.

Can someone post an example plrase when (2) and (3) can be exercized ?

thanks, Sergey