<jsp:usebean id="xyz" scope="session" class="abc.efg.xyz">
this tag is used to instantiate a simple java bean in JSP.
the scope identifier sets the life time of the bean.
scope="page" the bean persists for that page only.
scope="request" the bean persists for that request.
scope="session"  the bean persists for the whole session.

Now my requirement is more than that of "request" level scope as the
bean will be used for more than one request.
So i'm using "session" level scope.....but the fight is that I've to
kill that object at some point of time even if the session is still
there and the prob is that the object instantiated using "usebean" tag,
I'm unable to kill using :
session.setAttribute("xyz",null);  //ie setting xyz object to null.
(maybe i'm doing the wrong way)

solutionss considered so far are :
1. make the scope request level,
        then as soon as the object is instantiated put it in session
using :
        session.setAttribute("objXYZ",xyz);
        then i can set it to null using :
        session.setAttribute("xyz",null);
(this option is not a very good option as it leads to session mgmt of ur
own + other complications but it works)

2. I actually changed the design of my bean to solve the above prob
(beyond ur scope to tell u the details).
(again this option is also just an alternate method of just making the
JSP to run properly)


IF THERE EXISTS ANY METHOD BY WHICH AN OBJECT INSTANTIATED USING
<USEBEAN> TAG WITH SCOPE LEVEL "SESSION" CAN BE DELETED WITHIN THE SAME
SESSION THEN THAT WILL BE THE BEST SOLUTION.

kindly suggest any solution if u have in ur mind.

M

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to