This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

error page

 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I'm studying the topic about creating my own error pages and how to recover from that.
I've created a small test that is made of 2 JSPs. The first JSP (Result.jsp) is a page that use a custom EL that can generate a java.lang.ArithmeticException.
The second JSP is the errorPage (error.jsp).

When I declare my error-page like the code that follows, the stack trace is presented to the browser instead of my error page.



But when I declare my error page at DD like the code below it works perfectly:


Indeed, the java.lang.ArithmeticException occurs at the class that implements my custom EL.
So, that's my doubt: I'd like to know, if there is any way to map an Exception that may occur bottom at the exception stack.

thanks
 
Niiraj Patel
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Adolfo,

Nice experiment ..!!

There is no way out to map your actual Exception to your ELException.

Resoan is, Normally EL expression methods in API throw javax.el.ELException which is RuntimeException.

Thanks,
Niraj
 
Stoian Azarov
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Adolfo,
Can you provide the EL expression that throws javax.el.ELException. I have been trying to simulate your example but without any success. My error page is working even if I define it in DD with java.lang.ArithmeticException.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic