users@jersey.java.net

Re: [Jersey] Strategy for handling 404 when URL does not match _at_Path

From: Felipe Gaucho <fgaucho_at_gmail.com>
Date: Tue, 18 Aug 2009 08:03:20 +0200

You can use regular expressions in your path mapping...

On 17.08.2009, at 22:42, Ross McDonald <rossajmcd_at_gmail.com> wrote:

> Hi Guys.
>
> Just wondering if you can advise me on this. If I look at the
> helloworld sample, and instead of using the URL:
>
> http://localhost:9998/helloworld
>
> I use:
>
> http://localhost:9998/helloworlds
>
> I get a 404, with a blank page, as expected.
>
> What I want to be able to do is respond with a custom xml document,
> with an associated 404 header.
> I am familiar with creating custom xml responses.
>
> Is there a way I can code another method into my resource to map the
> previously mentioned response?
>
> Thanks in advance for your help,
>
> regards,
>
> -- Ross
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>