users@glassfish.java.net

Re: Why is Glassfish error page appended to my own JSP error page?

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 Jan 2008 14:19:35 PST

> I can't look at your attached file, for some reason.
> Maybe you should attach it as .text file instead of
> .html?

What did you see? Did you see a "Sun Java System Application Server 9.1 - Error report:" page? Then you did see the actual error page that I had attached... I have reattached it as "error_page.txt".

> Anyway, I have tested plain JSP pages with page
> directive errorPage and isErrorPage, and they worked
> as expected. I'll check with out JSF expert to see
> if JSF does its own error processing and somehow
> interferes with JSP errorPage.
>
> It'd also help if you can provide a simple war that
> demonstrates this problem.

I also have attached a demonstration that I based on the guessNumber example from the Java EE5 Tutorial. I made the following changes:

- added my own "errorpage.jsp" file to directory "web"
- modified the "response.jsp" and "greeting.jsp" pages to include the directive "<%@ page errorPage="errorpage.jsp" %>"
- added the scriplet "<% int a = 2 / 0; %>" to "response.jsp" to provoke an exception

After deploying the example application, go to http://localhost:8080/guessNumber, and enter the number. You should see "Sun Java System Application Server 9.1 - Error report:" page. If you look at the HTML code of the generated page, you will see that there are to complete <html></html> documents in it, one from errorpage.jsp, and one appended by Glassfish.

Thanks
Stephan
[Message sent by forum member 'smuehlst' (smuehlst)]

http://forums.java.net/jive/thread.jspa?messageID=252822