users@glassfish.java.net

JAX-RS error code 500 = GlassFish HTML error page

From: <glassfish_at_javadesktop.org>
Date: Mon, 11 Jan 2010 07:43:49 PST

Hi,

I'm creating a JAX-RS web service using Jersey in GlassFish 2.1. When my service returns error code 500 for server error, along with a "Reason-Phrase" response header, GlassFish completely takes over the response and outputs its own headers + body containing an HTML view of the error. I don't have any error pages configured in web.xml, this is a GlassFish branded error screen.

How can I tell GlassFish to leave my errors as-is so a REST client can make use of it?

How can I make GlassFish use custom error pages for all URI's that do not start with /rest/ ?


Thanks,
Ryan
[Message sent by forum member 'rdelaplante' (ryan_at_ijws.com)]

http://forums.java.net/jive/thread.jspa?messageID=380095