Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

lifecycle diff between HTTP servlet and generic

 
Hari babu
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is there any diffrence between the HTTP servlet and generic servlet's life cycle ?
Hari
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The basic life cycle is the same:
1.init method run when servlet engine needs an instance and before any requests.
2. requests go through the service method - which has default behaviour in HttpServlet, but must be provided by the programmer in GenericServlet.
3. destroy method is called by the servlet engine before it discards the instance.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic