During that, I stumbled across a problem that actually has nothing to do with either Spring 3.0 nor Tomcat:
While implementing a sample application I’ve also written a simple custom 404 page and included it in my web.xml:
I thought that should work but was wondering why (my default browser) Chrome didn’t render my simple 404 page but should it’s custom browser-built-in 404 page. Same with Internet Explorer. I first thought of a configuration problem in Tomcat, tried thousands of things but didn’t find a solution. Then I found out that Firefox 3.5 rendered my custom 404 page while IE and Chrome still didn’t.
Finally an article on the 404 Research Lab pointed out the reason for that problem: If a custom 404 page is smaller than 512 bytes, then IE and Chrome display their own built-in 404 page. So if you want to have your own 404 page and ensure that it’s rendered on all browsers, make sure that it’s big enough. 😉