1、web.xml中配置error页面
一、<error-page>
<error-code>500</error-code>
<location>500.jsp</location>
</error-page>
二、<error-page>
<exception-type>java.lang.xxxException</exception-type>
<location>500.jsp</location>
</error-page>
原文:http://www.cnblogs.com/gaoxufei/p/7044088.html