No - images will be served by the default servlet so nothing needs to be
done for images.

The filter is used as a way to let the invoker work and be a tiny bit more
secure. So the filter is mapped to /* and will forward anything to the
invoker serllet if the requested path *looks like one of your classes*. ...
otherwise the filter uses chain.doFilter(...)  to let the request be handled
by any other mapped servlets. (In this case the default servlet)

There are many tutorials on the web about filters


-Tim

On 6/8/2011 11:25 AM, falva...@geocom.com.uy wrote:

Interesting Tim. But a little confusing for me.

Never used filters, but for what you said and I googled: I would have to
build a filter and map it to "/images/*", right?

Something like:
    <filter>
        <filter-name>Resource filter</filter-name>
        <filter-class>com.mycompany.resourcefilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>Resource filter mapped</filter-name>
        <servlet-name>/images/*</servlet-name>
    </filter-mapping>

If I understand correctly, every request made to this URL path will be
answerd with what I declare in the filter.

Reply via email to