【发布时间】:2018-01-17 05:09:33
【问题描述】:
在 /conf/web.xml 中我提到了一个标签,如下所示:
<error-page>
<exception-type>401</exception-type>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>403</exception-type>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>404</exception-type>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.jsp</location>
</error-page>
在此之前我也提到过
<error-page>
<exception-type>404</exception-type>
<location>/error.jsp</location>
</error-page>
但它仍然呈现相同的tomcat默认页面,而不是自定义的“error.jsp”页面。自过去 13 小时以来,我一直陷入这个问题。
【问题讨论】:
-
您是否停止并重新启动了 Tomcat?
标签: java xml apache jsp tomcat