Lewis Geoff wrote:

> Hi Jill,
>
> >  This poses a big problem however if the
> > user has more than one browser up.  Then the bean is shared and
> > data gets clobbered.  I cannot for the life of me figure out a
> > good solution to this.
> >
> There is no easy solution to this, I believe. It's also not exclusively a
> problem with beans - it's more fundamental - and actually boils down to two
> problems:
> 1. Identifing which of your windows is responsible for an object and can
> edit and save it (session/ownership)

If your servlet engine allows this, try turning off using cookies for session
management.  If you are using URL rewriting instead, you can arrange that each
window has their own session (but you still have to manage how the user creates the
new window).

>
> 2. Stopping other windows/pages from clobbering the object (locking)
>

You should note that this is an issue even when you have a single window.  Consider
the situation where you have four frames, all of which are in the same window and
therefore attached to the same session.  You will be receiving simultaneous
requests for the contents of each frame.

Another case -- a user requests a page that takes a while to produce, gets
impatient and presses stop, and goes on to another link.  The lengthy request and
the new request are in progress simultaneously, so you still have to be aware of
locking requirements.

Craig McClanahan

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