Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JSP and the fly likes jsp error handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp error handling" Watch "jsp error handling" New topic

jsp error handling

Thor Silva

Joined: Mar 06, 2003
Posts: 14
Hello all,

I'm having problems with the following code:

//file 1
<%@page errorPage="ErrorPage.jsp" %>
if(true) throw new Exception("Test");

<%@page isErrorPage="true" %>

Both files are in the same directory (jsptests) below webapps . The structure of this directory is normal (has a WEB-INF , classes, lib , etc. folders). When I run this code inside Netbeans it works . When I run this code out of Netbeans it doesn't work . So is my question: Why ? Does Netbeans do any configuration on Tomcat ?

A second test that I do is:

<%@page isErrorPage="true" %>
<%= exception.getMessage() %>

It didn't work too . Why ?



Have a nice day and TIA<p> From<p> Thor
Thor Silva

Joined: Mar 06, 2003
Posts: 14
Hello All,

I got the answer now ... The problem is not with the code , but with the browser . In Firefox the code works well . On IE6 doesn't . On IE6 you need to disable an andvanced option of "show friendly HTTP error messages" .

That's all folks

I agree. Here's the link:
subject: jsp error handling
jQuery in Action, 3rd edition