tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: Static resource mapping in web.xml
Date Wed, 08 Jun 2011 16:34:35 GMT
I thought the filter would allow me to serve the static resources under

I understand if it is in order to make invoker more secure.

But what I'm actually trying to achieve is the proper serving of resources.

I don't know exactly why, but mapping the default servlet to "/*" is not
working (probably my fault). What Mark pointed in his first mail is that
this kind of mapping was added in release 6.0.30. I'll try this as soon as

-----Mensaje original-----
De: Tim Funk [] 
Enviado el: miƩrcoles, 08 de junio de 2011 12:44
Para: Tomcat Users List
Asunto: Re: Static resource mapping in web.xml

 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


On 6/8/2011 11:25 AM, 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-name>Resource filter</filter-name>
        <filter-name>Resource filter mapped</filter-name>

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message