I know this doesn't answer your question, but doesn't 204 do what you want
already?
--Erik


On Tue, Dec 9, 2008 at 6:58 PM, <[EMAIL PROTECTED]> wrote:

> I define a customized status code(299) to handle the case of a success
> request with no data found. I tried two different ways to set this status
> code(see below), but the status code client receives is 404, not 299.
> There's no place in my codes to set status to 404, so this 404 must be
> generated by Resetlet automatically.
>
> If I change 299 to any 400-level or 500-level code, for example, 499, then
> it works fine. Does anyone know why?
>
> If there any way I can set a status of 299?
>
> Thanks.
>
>
> <code>
> // somewhere define my customized status
> public static Status SUCCESS_NO_DATA = new Status(299);
> //
> public Representation represent(Variant variant) throws ResourceException
> {
>  try {
>    // ...
>  } catch (Exception e) {
>
>    // OPTION getResponse().setStatus(SUCCESS_NO_DATA, "No Data");
>
>
>    // OR
>    // OPTION 2
>    throw new ResourceException(SUCCESS_NO_DATA, "No Data", e);
>  }
> }
> </code>
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=981976
>

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=981980

Reply via email to