Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

events on startup of webapp  RSS feed

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On startup of webapp
##load the servlet class
##instantiate the class
##call init
##call contextInitialized(if listeners are existing
)
when there is a request
##call service
if session is created using HttSession ses = request.getSession(true) and listeners are implemented
##call sessionCreated

on shutdown
destroy
sessionDestroyed
contextDestroyed
Please add if I am missing something
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It's my version:
On startup of webapp
##load the servlet class
##instantiate the class
##call init
##call contextInitialized - if ServletContextListeners is declared in DD.
when there is a request
##call service -> (doGet, doPost)
##HttSession ses = request.getSession() - use the existing session or create one if necessary.
##call sessionCreated() - if the class implement HttpSessionListener.
##call sessionDidActivate() - if the class implement HttpSessionActivationListener.
##call other listener methods if any session listener interfaces are implemented.
on shutdown
##destroy
##sessionDestroyed, sessionWillPassivate? ..
##contextDestroyed
Sorry, I just add on the author's message.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on shutdown if i have attribute listeners
then it would be
session attributeRemoved
sessionDestroyed
similarly for ServletContext attributes too
am I correct...
I am really not sure SessionDidActivate and SssionWillPassivate ..I mean the order they will be called. I feel wcd gurus should help us with this
 
You didn't tell me he was so big. Unlike this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!