users@jersey.java.net

Re: _at_RolesAllowed - Customizing error pages

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Mon, 29 Nov 2010 16:09:41 +0100

On Nov 29, 2010, at 3:27 PM, tmp wrote:

>
> Sorry. I don't understand your question.
>
> I asked myself why this code did not work:
>> return Response.fromResponse(r).entity(new Viewable("/error-pages/
>> 404",
>> null)).build();
> (i got a browser-intern message that the resource is not available)
>
> But when changing it to
>> return Response.ok(new Viewable("/error-pages/404", null)).build();
> everything works fine.


Doh! i did not see that.

But did you notice in your first block of code that you were checking
for a 403 instead of a 404? was that just an email typo?

Paul.