• Post Reply Bookmark Topic Watch Topic
  • New Topic

how server will know ?

 
Sakthi Kani
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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

Thanks in advance.
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!