users@glassfish.java.net

Re: JAX-RS error code 500 = GlassFish HTML error page

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 14 Jan 2010 16:18:24 -0800

On 01/14/10 03:21 PM, glassfish_at_javadesktop.org wrote:
> What about when I configure custom error pages for 404, 500, etc. because my .war file contains a website, but the JAX-RS API in the same .war file needs to return 404 and 500 error codes? The custom error page should not be sent in the JAX-RS API responses. I don't have a good solution to offer.
>

This goes back to your original question:

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

Perhaps the new configuration in sun-web.xml that will be used
to disable the default error page could specify a comma-separated
list of request url-patterns (path prefices) as its value. An empty list
would disable the default error page for the entire application.

Jan


>
>
>
>> I like your suggestion of allowing to disable the
>> default error page
>> on a per-application basis via some configuration in
>> sun-web.xml, and have
>> reopened
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=
>> 11423
>> (the issue
>> that Ryan had filed) so that it can be fixed
>> accordingly.
>>
>> Thanks,
>>
>> Jan
>>
> [Message sent by forum member 'rdelaplante' (ryan_at_ijws.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=381037
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>