• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Servlet initialization  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!