users@jersey.java.net

[Jersey] It Works - Using Response with non 200 responses

From: dloy <david.loy_at_ucop.edu>
Date: Tue, 15 Sep 2009 09:18:51 -0700

Sorry to bother the list with this earlier.
Response.ok(file, mimeType).status(501).build();
works.

Thanks
David
-------------------



I currently use Response with the ok method.

Is it possible with Response to return a non-OK (e.g. 501) response with
a body and mime type for that response?
e.g. Response.ok(file, mimeType()).status(501).build(); I'm not sure if
http allows this.

Basically, I want to return an text/xml response containing information
about an exception with a bad status.

Also, could you tell me what is a good link for info on
javax.ws.rs.core.Response.Builder.

Thank you so much
David


*

*



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net