Forums Register Login

public void init(ServletConfig)

+Pie Number of slices to send: Send
Hi, I have a question about public void init(SrvletConfig). When is this method invoked? Is it invoked each time a request to the servlet is made?
Thanks.
+Pie Number of slices to send: Send
The API guarantees that init will be called before any request is processed. It is the first method called after the servlet container creates a servlet object, and is only called once.
At the other end of the servlet object life-span we have the destroy() method which the servlet container calls before discarding your servlet object.
Bill

------------------
author of:
+Pie Number of slices to send: Send
Thank you Bill.
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 4413 times.
Similar Threads
init() about servlet life cycle ?
what are the return values of init method in servlets
doubt in enthuwere mocktest question
servlet questin
Which one gets first executed ?????????
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:21:09.