• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception Handling

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
I just want to have your views for the exception handling.
i am dealing with some JSP pages and Beans and a Database.
** should i put my entire code for a JSP inside one try-catch block?
[your views plz]

** can i have more than one errorpage or just one errorpage for my all JSP pages? If i can't have more than one then how am i to configure that only err page for different kind of errors?

Thx
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


should i put my entire code for a JSP inside one try-catch block?



No necessarily.


can i have more than one errorpage or just one errorpage for my all JSP pages?



Sure, you can have as many error page as you wish as long as you configure them in web.xml
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1- Its better to implement MVC2 Architecture anyway.

2- You can configure you error pages in deployment descriptor. It depends what make you feel better one error page or multiple error page. I would suggest you can have one error page per error type. Or you can also have only one error page for all by ust changing the error messages.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic