Yep, You need to register in the web.xml using the listener tag. This process is almost exactly the same as with other listeners. The listener must be defined in the web.xml for all the possible servers.Remember, the activation method and passivation methods will probably be called on different systems.
RajN - (SCJP,SCWCD,SCBCD,SCSA,IBM XML 142 )
You do what you love, love what you do and always deliver more than you promise
Please refer Java 2 Web Developer Certification Study Guide by Natalie Levi, Philip heler Chapter 4: The Servlet Model , Page 143. It clearly explains that HttpSessionActivation listener needs to be registered in the Deployment Descriptor file. Thanks, Raj
if i would you, i would not trust this book too much: Java 2 Web Developer Certification Study Guide It has lots of mistakes here and there. I read most of the books already. i have to say, it needs to be proof read few times before publishing it.
Sun Certified Web Component Developer for the J2EE Platform<br />Sun Certified Programmer for the Java 2 Platform
Joined: Nov 14, 2000
They are famous for putting books on the market real real fast with huge amount of error. Unsuspicious buyers made them real real rich... In 1999, The first print of Java 2 Certification Study Guide (SCJP) had 10 or 15 pages errata, and then errata for errata’s I put a very bad comment on amazon, they were too afraid to publish it. However, amazon then did give the first print buyers second print for free. Even so, it still contained many errors. Money, it is the drive force in their books. You might say that's normal. However, what is their responsibility? [ July 24, 2002: Message edited by: Roseanne Zhang ]
Joined: Nov 14, 2000
At least, I will never rush into the bookstore to buy their first print any more...
Joined: Feb 17, 2002
i wish i know this earlier. I think i wasted $40 or so. I think the SCWCD study kit from Manning is good enough for me.
Note: The Servlet 2.3 specification also contains the javax.servlet.http.HttpSessionBindingListener and the javax.servlet.http.HttpSessionActivationListener interfaces. These interfaces are implemented by objects that are stored as session attributes and do not require registration of an event listener in web.xml. For more information, see the Javadocs for these interfaces.