On Jan 27, 2009, at 11:59 AM, James Strachan wrote:
> 2009/1/27 Paul Sandoz <Paul.Sandoz_at_sun.com>:
>> Hi,
>>
>> I have forwarded this email to the relevant people.
>>
>> James, Craig, as of Servlet 2.5 is it possible to utilize a filter
>> from
>> which we decide to forward to static files or JSP pages or forward to
>> Jersey?
>>
>> For example,
>>
>> void doFilter(ServletRequest request, ServletResponse response,
>> FilterChain chain) {
>> if (request is for Jersey) {
>> forward request to Jersey
>> } else {
>> // Handle static files and JSPs
>> chain.doFilter(req, res);
>> }
>> }
>
> 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?
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.
Paul.