wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on Session Attribute and Web Deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt on Session Attribute and Web Deployment" Watch "Doubt on Session Attribute and Web Deployment" New topic
Author

Doubt on Session Attribute and Web Deployment

Abhishek Pratap
Ranch Hand

Joined: Apr 14, 2006
Posts: 43
hi All,

1)if an attribute is replaced in session... do its valueUnbound() called, if the attribute of that type is registered with HttpSessionBindingListener.
Enthuware doesnt mark it correct.

2)What is the correct sequence while web application is deployed?
a. Instantiate listeners defined in the deployment descriptor.
b. Initialize filters defined in the deployment descriptor.
c. Initialize servlets that are set to load on startup.
d. Call the contextInitialized method on the listeners implementing ServletContextListener interface.

regards,
Abhi
Lalit mishra
Ranch Hand

Joined: Sep 01, 2005
Posts: 99





output is

value is bound
value is bound
value is unbound
value is bound
value is unbound
value is bound
value is unbound

When an attribute is replaced valueUnbound method is called..

Please correct me if I am wrong
Lalit mishra
Ranch Hand

Joined: Sep 01, 2005
Posts: 99
Answer for your second Question is

Instantiate listeners defined in the deployment descriptor.
Call the contextInitialized method on the listeners implementing ServletContextListener interface.
Initialize filters defined in the deployment descriptor.
Initialize servlets that are set to load on startup.
Abhishek Pratap
Ranch Hand

Joined: Apr 14, 2006
Posts: 43
what is the source of answer2?
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
In a past posting, people got different answers depending on which container they ran in

http://www.coderanch.com/t/175535/java-Web-Component-SCWCD/certification/Listeners
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt on Session Attribute and Web Deployment