users@jersey.java.net

Re: [Jersey] Static references from JSP

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 27 Jan 2009 16:28:13 +0100

On Jan 27, 2009, at 4:21 PM, Marc Hadley wrote:

> 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.

Got a pointer to the code?


>
>
>> 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...
>

I agree.

Paul.