Try this:
public void clearSession(HttpSession session)
{
Enumeration eAttributes = session.getAttributeNames();
while (eAttributes.hasMoreElements())
{
String attributeName = (String) eAttributes.nextElement();
session.removeAttribute(attributeName);
}
}
see http://java.sun.com/products/servlet/2.3/javadoc/index.html
Regards,
Richard Yee
-----Original Message-----
From: A.C. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 9:46 AM
To: [EMAIL PROTECTED]
Subject: how to kill objects in session
I want to "kill" ("delete", "set to null", "reset", call it as u
prefer) all the objects stored in the session (but i don't wan't to
invalidate the session).
How can i do that?
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets