• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error Handling in JSP  RSS feed

 
Daniel Jabonete
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rancherz,

I am trying this code out and expecting to have either a null or the error it self. Please see the code below...

in my jsp;

<%@ page isErrorPage="true" %>
<%@ page errorPage="errorpage.jsp" %>
<html>
<head>
<title>Testing Error Page Behaviour in JSP</title>
</head>
<body>
<% int i = 10 / 0; %>
<%= exception.getMessage() %><br>
If you see this, we survived!
</body>
</html>

it returned a java.lang.StackOverflowError...

Anyone can help in what really happen. Thanks in advanced!

Cheers!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you put this code ? Into errorpage.jsp ?
 
Daniel Jabonete
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Christophe Verre,

your correct, i've also put the code in errorpage.jsp.

i am wondering why java.lang.StackOverflowError has been thrown.

is it because i put both the error directives in the same page that causes the loop...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!