How should this situation handled?

A method call inside your servlet has thrown an IOException resulting from a lost network
connection to a necessary resource. The servlet has determined that it will be unable to operate
successfully fen few minutes, but expects to be able to resume operation after that period. How
should this situation handled?

A method call inside your servlet has thrown an IOException resulting from a lost network
connection to a necessary resource. The servlet has determined that it will be unable to operate
successfully fen few minutes, but expects to be able to resume operation after that period. How
should this situation handled?

A.
The servlet should re-throw the exception to the web container.

B.
The servlet should throw a servletException to the web container.

C.
The servlet should throw an unavailableException to the web container.

D.
The servlet should redirect to an error page that reports the exception message.

E.
The servlet should retry the request until the method returns successfully.

Explanation:
http://jcp.org/aboutJava/communityprocess/first/jsr053/servlet23_PFD.pdf (page 26,
topic: 2.3.3.2, first paragraph)



Leave a Reply 2

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


Allan Santos

Allan Santos

It is C.