web.xml: <error-page>
    <error-code>404</error-code>
    <location>/building.jsp</location>
</error-page>

<error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
</error-page>加入这个以后为什么开始好使,如果你持续刷新就会出现错误页呢也就是404或者500的错误还是会被显示出来