小编典典

J2EE:显示“错误”页面时出错

jsp

我创建了一个jsp包含

<% 
  int i=10;
  if(i==10)
  throw new ArithmeticException("ItsMyGenExcepetion"); 
%>

我已经在web.xml中输入了

<error-page>
<exception-type>java.lang.ArithmeticException</exception-type>
<location>/errordisplay.jsp</location>
</error-page>

我有我的errordisply.jsp包含

<%@ page isErrorPage="true" %>

在体内

The page contain error <%= exception %>

但它没有显示错误页面…。


阅读 215

收藏
2020-06-10

共1个答案

小编典典

在这里,我有解决方法,但没有解决方法

当我使用Eclipse的(SDK 3.2)Web浏览器时…

该页面正在显示

无法显示该页面您尝试访问的页面有问题,无法显示。


请尝试以下操作:

打开localhost:8080主页,然后查找所需信息的链接。单击刷新按钮,或稍后再试。

单击搜索以在Internet上查找信息。您还可以查看相关站点的列表。

HTTP 500-内部服务器错误Internet Explorer

当我将mozilla firefox用于相同的URL时,它可以工作。

但为什么???

2020-06-10