没有web.xml的Servlet异常

时间:2018-01-19 08:11:48

标签: java servlets exception-handling web.xml

我有ExeptionServlet捕获异常并显示我需要的信息。

我在web.xml中指出

<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/exception</location>
</error-page>

<error-page>
<exception-type>java.io.IOException</exception-type>
<location>/exception</location>
</error-page>

如果没有web.xml和Spring怎么办?

0 个答案:

没有答案