• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ mock exam q 40

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is to select whichever is true for a Servlet's life cycle and one of the answers is

The web container calls the servlet's destroy method when the servlet is destroyed or unloaded.Is this correct?

I feel when it want to take the servlet out of service it will call the destroy method.It doesnt make sense its called when it is destroyed.Please share your thoughts on this?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when the servlet is destroyed or unloaded.

I guess that they meant when the servlet is removed. When it's being discarded by the container.
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the exam will the options be vague like this?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the phrasing should be clear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic