The problem with implementing conversational state with a Stack is that it
is a FILO Collection.  What happens if your user does not navigate linearly
(e.g., jumps back 2 pages instead of 1 through a bookmark)?  Why not use the
container's built-in Enumeration in the Session object?  Pet Store uses EJBs
to maintain coversational state, and there's nothing wrong with that
providing your needs justify the weight.

I have found Alur, et. al., "Core J2EE Patterns" very helpful for designing
apps that both use EJBS and use only servlets and helper classes.  An
abbreviated snapshot of its contents can be found at
http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html

And yes, Struts does this - and more.  Check out the Struts user group (and
archive) for details.

Mark

-----Original Message-----
From: Vincent BUI [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 11:20 AM

I'm looking for ideas on how to keep a kind of
conversational state in a web application. I think
that the servlet forum is the most appropriate place
to discuss this since servlets are used for navigation
control (as recommended).

I try to use an MVC architecture for my transactional
web application, such as one implemented on Sun site
("petstore application" for those interested). So far,
I'm quite satisfied with it. But here's my problem:
Users quite agree with me not to use those damned Back
and Forward buttons due to problems they may cause.
But then, they would like me to propose my own Back
and Forward buttons in the contents of the pages, and
a kind of history from the first page to the latest,
no matter how many they have been through.
I know that one ambition of Struts is to develop this,
I don't know if it works yet. Any Struts user who can
confirm this?

So I intend to put a Stack container in each user's
session, and put inside every page they are through.
The questions are: what kind of object to put in to
keep track of contents of pages they have been
through? And how to implement the piling and depiling
so that history is kept?

Is there any recommended design pattern?
My pages are mostly implemented by jsp's, or even by a
collaboration of jsp's (through include tags). And I
use one front controller servlet to handle requests
and flows.

Thanks in advance for any idea, hint, article,
website, book on the subject.
Vincent


=====
Vincent BUI,
[EMAIL PROTECTED]

PS : la signature de propagande qui suit n'est pas de mon fait.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to