Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on Session Attribute and Web Deployment

 
Abhishek Pratap
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator





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
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the source of answer2?
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic