java - servlet life cycle while loadOnStartup -



java - servlet life cycle while loadOnStartup -

when mention servlet loadonstartup in web.xml init method called sure. wanted confirm service , destroy methods called or not? if not when called?

another question mentioned every init method called once. mean when servlet gets request first time, init method called , service called.

but destroy not called. when sec request phone call service method 1 time again not init method. understanding correct? when container decides phone call destroy method?

loadonstartup means servlet loaded (and init(..) method called during container startup. otherwise, suspect, loaded when first request comes containers have 1 instance of each servlet. when create it, phone call init(..). when context undeployed (for illustration - container stopped), destroy() called

java servlets

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -