Hybris 中的自定义 500 错误页面

sha*_*ait 2 error-handling web.xml spring-mvc http-status-code-500 hybris

我必须在 Hybris 的空白页面上重定向您在图片中看到的 500 错误页面。

在此处输入图片说明

怎么能做到这一点?

Fre*_*ded 5

您是否尝试过在 web.xml 中启用错误页面?

<error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/WEB-INF/pages/error/serverError.jsp</location>
</error-page>
<error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/pages/error/serverError.jsp</location>
</error-page>
Run Code Online (Sandbox Code Playgroud)