• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

methods in Listeners

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Last night I was going through the listeners(ServletContextListener...) in HFSJ.
Do we have to remember all the method names in all those 8 listener interfaces.
What sort of questions are asked in the exam from the listener perspective.
Any leads ?
 
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should have a fair understanding about the methods in each interface.
The other things are,
1.Listener Events.
2.The listeners which need not register in the DD.
3.Its order of execution


Thanks..
[ March 14, 2006: Message edited by: Vinod NS ]
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Do we have to remember all the method names in all those 8 listener interfaces.



Yes you have to remember the method names. For example

For Request and Context listeners we got requestInitialized() and contextInitialized() methods whereas for session it is sessionCreated().

You also got to memorize their respective events.
 
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you have to know the listeners, the method names, the method parameters (the actual event classes), AND the method available from the event. For exemple, know that HttpSessionEvent has a getSession() method to access the session your listening to.

Know also when listeners are loaded and in which order.
Know in which order they are invoked (both during webapp life and at webapp shutdown time (reverse order for this one)).

This is not a great amount of work, but definitely necessary.
 
This tiny ad is suggesting that maybe she should go play in traffic.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic