【问题标题】:A global error page for tomcat 6 [duplicate]tomcat 6的全局错误页面[重复]
【发布时间】:2012-04-24 11:42:44
【问题描述】:

可能重复:
Is there a way to configure usage of ONE custom error page for ALL error codes in tomcat's web.xml?

我想将所有 HTTP 错误(4xx、5xx)重定向到全局错误页面。有没有比在我的 web.xml 中添加大量错误页面元素更好的解决方案?

谢谢

【问题讨论】:

    标签: tomcat global custom-error-pages


    【解决方案1】:

    写一个自定义的报错Valve,指定给Host的errorReportValveClass

    【讨论】:

    • 感谢您的回答。效果很好
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-12-21
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-19
    相关资源
    最近更新 更多