• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mock question regarding listener interfaces

 
pradeep singh
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
51
Marks: 1 Which of the following classes is appropriate for monitoring when users sign into the system and recording it in the log.
Choose one answer.
a. ApplicationContextAttributeListener
b. HttpSessionListener
c. HttpSessionActivationListener
d. HttpLoginListener
e. ServletContextListener


Answer given is b. But i think it is wrong and e should be the right answer


source:Marcus exam 3
 
Javier Snaider
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

ServletContextListener listen aplication start up and destroy events, not session o request events.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pradeep singh:

Answer given is b. But i think it is wrong and e should be the right answer


Pradeep,
Can you tell us why you think E is the correct answer?
 
pradeep singh
Ranch Hand
Posts: 339
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I read this question in a wrong way.I treat this question like as which interfaces /classes are required to make entry in log file.So i choose ServletContext not ServletContextListener because it has log method .

Sorry for asking this .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic