Which is true?

A servlet wishes to indicate that it is unable to initialize at the present time, but that the initialization might succeed at some future time. Which is true?

A servlet wishes to indicate that it is unable to initialize at the present time, but that the initialization might succeed at some future time. Which is true?

A.
This cannot be expressed. A servlet either initializes correctly or fails.

B.
This expression is not necessary. If a servlet fails to initialize, the container will try again later each time a request is received that attempts to invoke that servlet.

C.
The servlet should delay until it is ready to complete initialization successfully.

D.
The servlet should throw an UnavailableException

E.
The servlet should throw a servletException



Leave a Reply 7

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


Ouadie

Ouadie

The Correct answer is : E

Arturo

Arturo

Why E?
I think it’s D.

Trovador

Trovador

Yes I think it’s D too

Rudi

Rudi

Yes, Correct Answer is D

Allan Santos

Allan Santos

In my option it is B. Because the question ask about initialization time. If were not because of that I would think D was the one too.

Adriano Palomino

Adriano Palomino

Correct answer is D

Tiparega

Tiparega

It’s D. Servlet 3.0 spec:
2.3.2.1
Error Conditions on Initialization
During initialization, the servlet instance can throw an UnavailableException or a
ServletException . In this case, the servlet must not be placed into active service
and must be released by the servlet container. The destroy method is not called as it
is considered unsuccessful initialization.
A new instance may be instantiated and initialized by the container after a failed
initialization. The exception to this rule is when an UnavailableException indicates
a minimum time of unavailability, and the container must wait for the period to pass
before creating and initializing a new servlet instance.