aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Regarding Listeners 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 "Regarding Listeners" Watch "Regarding Listeners" New topic
Author

Regarding Listeners

Nagamalini Pampati
Greenhorn

Joined: Oct 04, 2006
Posts: 20
For contextListeners......setAttribute()....... If the name specified is already used for an attribute, this method will REPLACE the attribute with the new value to the new attribute.
so at this time will both attributeAdded() and attributeRemoved() will be called?or only attributeAdded() will be called?
Pls explain me...
Thanks in advance,
Malini.
Nilesh Raje
Ranch Hand

Joined: Aug 02, 2005
Posts: 153
Malini,

I dint get your second part of question at this time..!?
The first Part is rite. wanted to know what you mean by at this time??


Thanks and Regards,<br />Nilesh<br />SCJP 1.4, SCWCD 1.4
Nagamalini Pampati
Greenhorn

Joined: Oct 04, 2006
Posts: 20
i mean when the attribute is replaced what methods are called?
arrributeRemoved() and valueUnbound() are called or only valueUnbound() is called?
Thanks,
Malini.
Nagamalini Pampati
Greenhorn

Joined: Oct 04, 2006
Posts: 20
sorry Nilesh.....
i want to ask...when the attribute is replaced which methods are called?
either attributeAdded() or attributedAdded() and attributeRemoved()?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

If you're talking about ServletContextAttributeListener, attributeReplaced will be called.


[My Blog]
All roads lead to JavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Regarding Listeners