aspose file tools*
The moose likes Struts and the fly likes Struts 2, Session Management and Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2, Session Management and "WorkFlow"." Watch "Struts 2, Session Management and "WorkFlow"." New topic
Author

Struts 2, Session Management and "WorkFlow".

Glen Divers
Ranch Hand

Joined: Jan 21, 2010
Posts: 61
Hi,

I have a use case, where after the user "logs in" to the application (handled by Spring Security) I need to start a "setup wizard" comprising three views and their associated actions. These must be processed in strict sequence and the user must not be allowed to break out by either typing a URL into the browser or loading a bookmark. Once the "setup wizard" is complete and the user moves into the application proper, (s)he should not be able to re-enter the setup wizard, unless he first logs out & logs in again. I had considered experimenting with the JQuery plugin to see if I could implement this as a series of modal dialogs, but of course I need javascript active at the client for this to work.

This appears to be the realm of either the ScopeInterceptor or the SpringWebflow plugin, but I'm having difficulty in finding tutorials or example code other than that cwiki.apache.org/S2PLUGINS (and the car insurance example mentioned by the SpringWebflow plugin, is not shipped with the download.) to help me decide which of these, if either, I should use. I'd be grateful for any pointers or suggestions.

In addition, since research suggests that it is practically impossible to prevent, I need to be able to handle the situation where, after establishing the session, the user opens multiple browser tabs into my app and runs multiple functions at the same time, for example, starts editing orders for two different customers in two seperate tabs. How do I keep "session data" seperate for the two tabs and stop these actions from walking all over each other.

And my final use case, is that I have one other "activity" that *absolutely must* be a session singleton. That is, it cannot start if the user is running another action, and while it's active, the user cannot start another action. What techniques/patterns is everyone using to handle this?

Regards
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please BeForthrightWhenCrossPostingToOtherSites. IIRC this has been brought up before.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2, Session Management and "WorkFlow".
 
Similar Threads
HttpSession
AJAX Article: Updated 6/23/2005
invalidate a session by using session id
session issues with multi tabs in a browser
session issue with multi tabs in a browser