Can we randomly remove the bean from the SERVLET or JSP.
Or
Is there any criteria to determine whether the bean should be removed from
the session in SERVLET or JSP.

----- Original Message -----
From: Craig R. McClanahan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 15, 2000 12:40 AM
Subject: Re: How do I destroy/reset a Session Java bean


> Graham Cruickshanks wrote:
>
> > I've been using a java bean to hold state while building a order in a
e-bis
> > app, Problem is that when the user goes through this order building
process
> > again it has all the old values,
> >
> > Is there a easy what to erase/reset a java bean which is a Session
object,
> > Without kill any other session objects,
> >
> > Or manually setting all values to defaults.
> >
> > He's the little son of a gun
> >
> > <jsp:useBean id="ordercreation" scope="session"
> > class="com.inrs.cannede.ordercreation"/>
> >
>
> In a servlet or JSP scriptlet, execute:
>
>     session.removeAttribute("ordercreation");
>
> if you're running on a 2.2 or later servlet container.  In earlier
versions it was:
>
>     session.removeValue("ordercreation");
>
> which still works in 2.2 containers, but has been deprecated in favor of
> removeAttribute() for consistency in method names.
>
> >
> > Thanks
> >
> > Graham Cruickshanks
> > www.inrs.co.uk
> >
>
> Craig McClanahan
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> 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".
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