aspose file tools*
The moose likes Servlets and the fly likes lifecycle diff between HTTP servlet and generic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "lifecycle diff between HTTP servlet and generic" Watch "lifecycle diff between HTTP servlet and generic" New topic
Author

lifecycle diff between HTTP servlet and generic

Hari babu
Ranch Hand

Joined: Jun 25, 2001
Posts: 208
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

Joined: Mar 22, 2000
Posts: 12806
    
    5
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
 
jQuery in Action, 2nd edition
 
subject: lifecycle diff between HTTP servlet and generic