users@jersey.java.net

Re: [Jersey] Static references from JSP

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 27 Jan 2009 10:21:11 -0500

On Jan 27, 2009, at 6:07 AM, Paul Sandoz wrote:
>>
>> Ah cool - so we could maybe specify a list of URI patterns for Jersey
>> to ignore then right - and use Jersey via a filter rather than a
>> Servlet mapping?
>
IIRC, the rails plug-in for glassfish is a filter and works in a
similar way. Again IIRC it looks to see if there is a static resource
that matches the request URI and if not it hands the request to rails.

> Right, that is what i am hoping, need to verify if it works. There
> is also another possible option: the jersey matching algorithm
> returns false if nothing can be served for the request (which then
> results in a 404) so a false could imply do "chain.doFilter(req,
> res)". That, however, requires more work to integrate.
>
That would also be less efficient since you'd have to run through the
jersey matching algorithm before serving every static file...

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.