This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes declaration of Listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "declaration of Listener" Watch "declaration of Listener" New topic

declaration of Listener

Saurabh Naik
Ranch Hand

Joined: Apr 24, 2008
Posts: 87
which interface need to be declared in the deployment descriptor .

HttpSessionListener or HttpSessionBindingListener ?

I guess HttpSessionListener .. is this correct answer ?

SCJP 6 (88%), SCWCD 5 (78%), preparing for SCBCD
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 365
Yes, you are right.

Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3775

Hi Saurabh Naik,

DeclaringListeners explains them well.

[How to ask questions] [Twitter]
Naveen Segu

Joined: Apr 29, 2009
Posts: 6
Hi Saurabh Naik,

All session listeners should be declared in the deployment descriptor (web.xml) EXCEPT HttpSessionBindingListener and HttpSessionActivationListener. Hope this helps.

SCJP 1.5, SCWCD 1.5
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39547
Doing a SearchFirst would have found this:

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link:
subject: declaration of Listener
Similar Threads
About Sessions
Execute code when a session expires
Get Total session count
Regarding Servlets
handling session time out