users@jersey.java.net

Re: [Jersey] Static references from JSP

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 02 Feb 2009 13:54:37 +0100

On Feb 2, 2009, at 1:28 PM, sarat.pediredla wrote:

>
>
>
> Paul Sandoz wrote:
>>
>>
>> On Feb 2, 2009, at 12:20 PM, sarat.pediredla wrote:
>>
>> OK.
>>
>> I thought filters are always invoked before a servlets thus filters
>> implicitly have a higher priority than a servlet. Is my assumption
>> wrong?
>>
>
> I am not sure. I am certainly not an expert on this but from what I
> can see,
> it is fairly obvious that my CSS and Javascript are all going through
> Jersey. I have a filter that forwards to static resources ending in
> *.js,
> *.css but these never get returned and when I check the logs, it
> looks like
> Jersey is trying to intercept these requests and failing because I
> have no
> resources defined for these (which I don't want to).
>

Drat. I wonder if the forward to the static resources in the filter is
resulting in the Servlet being executed?


> The basic problem for me is to "exclude" certain paths from being
> intercepted from Jersey and just let the container and other filters
> handle
> is. The other solution to a filter is to have an init-param that
> allows me
> to specify paths to exclude, so they don't go through Jersey.

> Mapping Jersey to something like /app/* is a possibility but doesn't
> seem
> very clean for me. I really want my users to http://localhost/
> contacts and
> just hit the resource directly.
>

I agree.


>
>
> Paul Sandoz wrote:
>>
>> Yes, we plan to do that. Unfortunately we do not have time to
>> implement that for the 1.0.2 release but it will be in the 1.0.3-
>> SNAPSHOT and release.
>>
>
> I appreciate this. I will see if we can do anything to help in this
> regards
>

Thanks!

Paul.