在web.xml中写入 <error-page> <error-code>404</error-code> <location> /WEB-INT/404.jsp</location> </error-page>