在web.xml中配置404错误拦截 <error-page> <error-code>404</error-code> <location>/home.do</location> </error-page>