问题
i have created a jsp contains
<%
int i=10;
if(i==10)
throw new ArithmeticException("ItsMyGenExcepetion");
%>
i have made entry in web.xml
<error-page>
<exception-type>java.lang.ArithmeticException</exception-type>
<location>/errordisplay.jsp</location>
</error-page>
i have my errordisply.jsp contains
<%@ page isErrorPage="true" %>
in body
The page contain error <%= exception %>
but its not showing the error page....
回答1:
Try adding:
<%@ page errorPage="/errordisplay.jsp" %>
to the JSP that is throwing the exception.
回答2:
here i got my quetions solution but not the answer
when i use Eclipse's (SDK 3.2) web browser...
the page is showing
The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:
Open the localhost:8080 home page, and then look for links to the information you want. Click the Refresh button, or try again later.
Click Search to look for information on the Internet. You can also see a list of related sites.
HTTP 500 - Internal server error Internet Explorer
where as,when i use mozilla firefox for the same url,it works.
but why???
来源:https://stackoverflow.com/questions/1470750/j2eeerror-in-displaying-error-page