web.xml中配置以下信息
<!-- 错误页面配置信息 -->
<error-page>
<error-code>404</error-code>
<location>/errorpage/404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/errorpage/500.html</location>
</error-page>
<error-page>
<exception-type>java.long.Exception</exception-type>
<location>/errorpage/exception.html</location>
</error-page>