Prev Question
Next Question

You are implementing a model component. You realize that an IOException might arise if you lose connection to the database. How should you address this?

Implement multipathing to provide redundant connectivity to the database, thereby avoiding that risk of connection failure.

Provide an error handler page, and use the page directive in the invoking ISP to redirect to that page if the error arises.

Use the JSTL <c:catch> tag to take control if the exception arises.

Surround the problem area with a try/catch block and implement appropriate recovery or fallback behavior.

Explanation: (topic: exception handling)

Prev Question
Next Question

Leave a Reply

Your email address will not be published. Required fields are marked *