David -

Not long ago I developed a site which used 'wizards' extensively.  It was
very important that the user completed the wizard sequentially (either
forward or backward one step at a time).  I ran into the same problem when
the user opened multiple windows....  This is how I solved it:

1) Each wizard was associated with an object.
2) Each object was persisted throughout the session.
3) Each object had a 'StepLastCompleted' property.
4) With each user request I would compare the 'StepLastCompleted' property
with the action the user was requesting -- the object encapsulated all of
the business rules... so this was just a matter of calling a method.
5) If the user attempted to 'move out of order' I would simply display the
next closest valid step with an explanation of the redirection on the page.

The whole key in getting this to work is the business rules.  In my case it
was easy... if StepLastCompleted is 4 then userRequestStep must be either 3
or 5.  If it's not then redirect to the next closest valid step.  If your
trying to do something similar with a whole site... the business rules would
get quite tricky.

I hope this answers your question....

What exactly is your aim?

Cheers

Steve

---------------------------------
Steve Zich
Partner
Digital Craftworks
19 Ward Street Suite 2
Seattle, WA 98109
206.378.1982
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
---------------------------------




-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of David Wall
Sent: Saturday, July 31, 1999 10:47 PM
To: [EMAIL PROTECTED]
Subject: Re: Sessions and multiple browser windows


Maybe I don't understand myself. But I can identify clicks okay, it's the
number of different browser windows (and hence a user is really running more
than one session in terms of context moving about various pages) that is
complicating things. In explorer, I can easily do a CTRL-N and get a new
window on the same page without anything being sent to the server. Or they
can SHIFT-click on a link and open that link in a new browser window. Either
way, they have more than one window up, each going about their different
paths just like they were two different people coming into the site, except
that in this case there will only be one servlet session active.

How can a URL help, unless I do something like use javascript to do
something 'odd' each time a new window is opened (can javascript detect
that?) so that I can tell one person now has more than one window open.
It's mostly not a problem because many pages do not require a lot of
context.  But, if you just have a form, and that form's values are kept in a
bean that is at session scope (so that it is easy to pass it from the JSP
page, to the post servlet, and back to the JSP page), then you will have a
problem if they open two windows on that page at the same time.

David

----- Original Message -----
From: Roger <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 26, 1999 5:26 PM
Subject: Re: Sessions and multiple browser windows


> Not to be trite, but what about URL rewriting? That identifies the exact
click,
> no matter where.
>
> "Kirkdorffer, Daniel" wrote:
>
> > David,
> >
> > We've had to create "user" objects we hang off the session object, and
pass
> > identifiers around to identify who is who.  It is an important
> > consideration.
> >
> > Dan
> > --
> > Daniel Kirkdorffer
> > NACN IS: 425-580-6225
> > Sr. Consultant, Syllogistics LLC
> > Email: [EMAIL PROTECTED]
> > Web:   http://www.syllogistics.com/
> >
> > > ----------
> > > From:         David Wall[SMTP:[EMAIL PROTECTED]]
> > > Reply To:     David Wall
> > > Sent:         Saturday, July 24, 1999 12:23 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:      Sessions and multiple browser windows
> > >
> > > I know this has been talked about before, but what are people doing
with
> > > objects that are at session scope when users have multiple browser
windows
> > > open at the same time?  It seems that very little may really be kept
at
> > > the session level to avoid conflicts among many windows, since I can
find
> > > a way to identify a request coming from a different window.
> > >
> > > David
> > >
> > >
> >
> >
===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff JSP-INTEREST".  For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to