1) Session.invalidate - self explanatory

2) Get the bean from the Session.getAttribute("id name of your bean");
Invalidate your bean with a user defomed  MyOrderBean.setValid( false )

3) Remove the bean from the session Session.removeAttribute("id name of your bean") man

--
Peter Pilgrim
G.O.A.T
                    "The Greatest of All Time"



---------------------------------------- Message History 
----------------------------------------


From: Thang Nguyen <[EMAIL PROTECTED]>@java.sun.com> on 21/11/2000 15:23 PST

Please respond to A mailing list about Java Server Pages specification and reference 
<[EMAIL PROTECTED]>

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and 
[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  How to delete a session bean?


Hi,

I have this question regarding to a session bean.   An example for this would be a
shopping cart, my beans are kept throughout all the pages (therefore I use session
beans), however, on my last page where I want to submit the order.
I want to delete all my beans after the order have been executed successfully.  The
reason I want to do this is to  avoid the users submit twice or maybe accidently
submit the outdated information.

How can I do this?   Thanks in advance.
TN

===========================================================================
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



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
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

Reply via email to