This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 12769
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: lifecycle diff between HTTP servlet and generic