File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Servlet initialization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Servlet initialization " Watch "Servlet initialization " New topic
Author

Servlet initialization

Jayashree Mohan
Ranch Hand

Joined: Nov 23, 2005
Posts: 37
During initialization, the servlet instance can throw which exception.

A.ServletNotAvailableException
B.ServletException
C.UnavailableException
D.UnableToInitializeException

My answer was B. but the mock exam said it was C. Now which is rite and why ??Need some help on this.
Akshay Kiran
Ranch Hand

Joined: Aug 18, 2005
Posts: 220
During initialization, the servlet instance can throw which exception.

A.ServletNotAvailableException
B.ServletException
C.UnavailableException
D.UnableToInitializeException

My answer was B. but the mock exam said it was C. Now which is rite and why ??Need some help on this.


SRV.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.


Actually, i just looked up too. Unavailable exception is a subclass of ServletException.
but I think the mock exam should have allowed u to select two because the cause of the exception is not given.

thanks for bring it to my attention, I hadn't look at the specs yet LOL


"It's not enough that we do our best; sometimes we have to do<br />what's required."<br /> <br />-- Sir Winston Churchill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Servlet initialization