HTTP 500 WebLogic 12.2的自定义错误页面未显示

时间:2020-04-14 11:45:45

标签: weblogic12c custom-error-pages http-status-code-500

我们有一个在WebLogic 12.2上运行的Web应用程序。这是一个使用JHipster的AngularJS应用。遇到HTTP 500时,不会显示自定义错误页面。其他错误页面也很好。

安全团队扫描了我们的应用程序,其中一项测试是执行此操作: https://my-web-application/ error.log

没有这样的文件“ error.log ”,但是当您尝试调用此文件时,Chrome的开发人员工具显示生成了 HTTP 500。 HTTP 500的自定义错误页面,该页面未重定向到该页面,并且扫描能够获取结果中的 HTTP 500 ;测试失败。

除HTTP 500以外,其他错误页面均无问题!

打开调试功能,并且出现仅此行是以下警告。 提出建议/意见,表示赞赏。

警告

2020-04-14 07:23:45,634 WARN  o.t.t.x.XhtmlAndHtml5NonValidatingSAXTemplateParser[LevelRemappingAppender.java:117] callAppenders: 
[THYMELEAF] The SAX Parser implementation being used ("weblogic.xml.jaxp.RegistrySAXParser") 
does not implement the "reset" operation. This will force Thymeleaf to re-create parser 
instances each time they are needed for parsing templates, which is more costly. Enabling 
template cache is recommended, and also using a parser library which implements "reset" 
such as xerces version 2.9.1 or newer.

web.xml

    <error-page>
        <error-code>401</error-code>
        <location>/general_errors.html</location>
    </error-page>
    <error-page>
        <error-code>403</error-code>
        <location>/general_errors.html</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/general_errors.html</location>
    </error-page>

    <error-page>
        <error-code>500</error-code>
        <location>/general_errors.html</location>
    </error-page>

    <error-page>
        <error-code>503</error-code>
        <location>/general_errors.html</location>
    </error-page>

    <error-page>
        <location>/general-errors.html</location>
    </error-page>



0 个答案:

没有答案