• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

error page

 
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic