Does this mean all static content is served using a filter? I got a blank installation of Tomcat and could not find anything image-related other than: <mime-mapping> <extension>gif</extension> <mime-type>image/gif</mime-type> </mime-mapping>
what am I missing? I decided to post this into Servlet forum because it seems to be a matter of standards rather than Tomcat... Thanks!
Joined: Feb 19, 2006
If you put your images right inside your web application just like you would put a JSP, web clients can simply access them directly without any filters or mapped servlets.
For example, if your webapp is named "test.war", and you put "test.gif" in the root directory of the WAR, the image can be retrieved directly from http://localhost:8080/test/test.gif.
Jon Emerson<br /> <a href="http://www.jonemerson.net" target="_blank" rel="nofollow">http://www.jonemerson.net</A>
Joined: Jul 13, 2004
Thanks for your response, but I want to actually understand how this works. i.e. how does Servlet Spec specify static content to be handleled and how it fits within the whole scheme of mapping servlets to URIs.
The part I'm most curious about is this. If static content is served by a servlet/filter, then why cannot i find the mapping for it? If static content is served by some other means, why cannot i find that in the spec?