This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes don't understand this question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "don Watch "don New topic
Author

don't understand this question

Poonam Agarwal
Ranch Hand

Joined: May 12, 2008
Posts: 323
Which of the following is a sensible way of sending an error page to the client in case of a business exception that extends from java.lang.Exception?

Note: A business exception means a checked exception that an application throws upon encountering a violation of a business rule. For example, a withdrawAmount() method in Account class may throw NotEnoughFundsException. Here, NotEnoughFundsException is a business exception.

A. Catch the exception and use RequestDispatcher to forward the request to the error page.
B. Don't catch the exception and define the 'exception to error-page' mapping in web.xml
C. Catch the exception, wrap it into ServletException and define the 'business exception to error-page' mapping in web.xml
D. Catch the exception, wrap it into ServletException, and define the 'ServletException to error-page' mapping in web.xml
E. Don't do anything, the servlet container will automatically send a default error page.

Please rancher help me understand this question. I totaly confused with the given correct options. A, C


Thanks <br />Poonam Agarwal SCWCD 86%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: don't understand this question
 
Similar Threads
Doubt on send Error
error page doubt
Wrapping a business exception in ServletException in doPost()
sensible way of sending error page to the client
Q: Appropriate Exception Handling in a servlet