Hi,Thanks for the reply!
However it is not working.
See after I got your reply, I tried the following:
I built a class SessionBean1 as following:
public class Sessionbean1{
private str="testing for session destroy";
//gettter and setter of str
}
In the faces-Config I had set the scope of the above class
as session.
Now in the backing bean of a page Page1.jsp that conatins
a h:commandButton I placed he following code in the action method of the
commandbutton
public
String button1Action(){
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("SessionBean1");
System.out.println(<obj>.getStr()); //here obj retreives the
//session scoped object of
//SesionBean1 class.
}
Probably this code should have given a nullPointer Exception because
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("SessionBean1");
should have destroyed the object of SessionBean1.But it did not.
My problem still stands .Please help!!
[ January 07, 2008: Message edited by: Dushyant Agarwal ]