This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes how server will know ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "how server will know ?" Watch "how server will know ?" New topic
Author

how server will know ?

Sakthi Kani
Ranch Hand

Joined: Mar 29, 2005
Posts: 98
Hi

How the server will know, when it can invoke init, service,destroy methods of servlet life cycle?

Thanks in advance.


" Don't be afraid of pressure. Remember that pressure is what turns a lump of coal into a diamond... " <br /> <br />Thanks & Regards...<br />Sakthi<br />SCJP1.4, OCA
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
HI sakthi

Init()
When a class is loaded its init method is called
(class is loaded on first request or on specifying in DD by giving <load-on-startup>tag)

service()
For each Request from client, service method is called

Destroy
When server is shutdown

hth(hope this helps--Bert Bates)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how server will know ?