On Mon, 17 Jan 2000, Craig R. McClanahan wrote:

> "Joseph B. Ottinger" wrote:
>
> > Given the code <jsp:usebean
> > id="myBean" class="myClass" session="scope" />,
> > is there a way for the session to remove the bean, in the case that it
> > preserves data across many pages but should preserve it across ALL pages?
> >
>
> In a JSP page, you can remove session beans with a scriptlet:
>
>     <%
>         session.removeValue("myBean");
>     %>
>
> The corresponding technique in a servlet is very similar:
>
>     HttpSession session = request.getSession();
>     session.removeValue("myBean");

Very nice. I wasn't sure if it used the id to store the bean in the
session or not. Thank you.

-----------------------------------------------------------
Joseph B. Ottinger               [EMAIL PROTECTED]
http://cupid.suninternet.com/~joeo      HOMES.COM Developer
PGP Key is : http://cupid.suninternet.com/~joeo/cherem_pgpk

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to