users@jersey.java.net

Strategy for handling 404 when URL does not match _at_Path

From: Ross McDonald <rossajmcd_at_gmail.com>
Date: Mon, 17 Aug 2009 21:42:37 +0100

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