I'm redirecting 404 errors to a servlet via the following in my web.xml.
<error-page> <error-code>404</error-code> <location>/notFound.do</location> </error-page>