Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Declaring an error page

 
Kathiresan Chinna
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have configured an error page for ArithmeticException.

<error-page>
<exception-type>java.lang.ArithmeticException</exception-type>
<location>/ArithmeticError1.jsp</location>
</error-page>

When arithmetic error happens,
In InternetExplorer
i got "The page cannot be displayed"

In Opera i got ArithmeticError1.jsp

Is there anything missed in my configuration ?

Thanks in advance
Kathir
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
similar to your problem is discussed here
 
cesar valencia
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you mean opera displays correctly the ArithmeticError1.jsp? if this is the case, i would look into the response sent by the container to internet explorer before redirecting to the error page. IE is configured by default to show custom error messages, so if the container sends 500 - server error before going to the next jsp, IE will catch that and show the standard error page.

chances are i'm totally wrong but like i said, if opera does show the jsp, then i would look into this theory.

edit:
oh, seetharaman beat me to it.
[ December 06, 2008: Message edited by: cesar valencia ]
 
Kathiresan Chinna
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Great, from that post:

Go to Tools -> Options -> Advanced (tab) and uncheck the "Show Friendly Errors" checkbox.

IE Works now

Thanks
Kathir
 
Kathiresan Chinna
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

This is the configuration in DD

<error-page>
<exception-type>java.lang.ArithmeticException</exception-type>
<location>/ArithmeticError1.jsp</location>
</error-page>

<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/ErrorPage1.jsp</location>
</error-page>

If a Servlet throws ArithmeticException then browser receives ArithmeticException.jsp
But, if JSP throws ArithmeticException then browser receives ErrorPage1.jsp

If I remove the <exception-type> java.lang.Throwable declaration from DD
then browser receives ArithmeticException.jsp

Is that the way of error-page works ?

Kathir
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic