tags:

views:

236

answers:

2

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....

A: 

Try adding:

<%@ page errorPage="/errordisplay.jsp" %>

to the JSP that is throwing the exception.

Nick Holt
A: 

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???

JavaResp
Are you using IE to test? If yes, then your error page must be greater than 512KB in size for IE to render the page. Otherwise, IE will render its default error page. Firefox renders the page whatever its size.
Shivasubramanian A
@Shivasubramanian-Aits true..thanks for clarification
JavaResp