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

Reply via email to