On Sep 3, 2008, at 10:26 AM, Juergen.Zimmermann_at_HS-Karlsruhe.de wrote:
> javax.ws.rs.core.Response.Status contains several values like
> NOT_FOUND, OK,
> ... Such status codes are available as constants in the class
> java.net.URLConnection, too (HTTP_NOT_FOUND, HTTP_OK, ...).
>
> When implementing a resource class what is considered as best
> practice?
> Using the constants of Response.Status or of URLConnection?
>
Use Response.Status. The codes are relevant to returning responses by
the application and may not have all the status codes or the complete
set defined in HttpURLConnection. But it is no big deal if you use the
integers in HttpURLConnection.
Paul.