aspose file tools*
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
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp error handling" Watch "jsp error handling" New topic
Author

jsp error handling

Thor Silva
Greenhorn

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");
%>

//ErrorPage.jsp
<%@page isErrorPage="true" %>
<htm><head><title>Error</title></head><body>Error</body></html>

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:

//ErrorPage.jsp
<%@page isErrorPage="true" %>
<htm><head><title>Error</title></head><body>
<%= exception.getMessage() %>
</body></html>

It didn't work too . Why ?

Thanks

Thor


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

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

Jack
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp error handling