File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Session inconsistencies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Session inconsistencies" Watch "Session inconsistencies" New topic
Author

Session inconsistencies

Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Hello,

how can we control session consistency in a multitabed browsers? I face a problem where my clients work on same JSP page in different tabs, on different data sets. For example they are editing two or more item description pages. Since there is validation of input, forms current data is held in a bean in session until such form is properly filled. There is only one bean per session, so the data between tabs that are submitted multiple times and fail to validate gets all mixed up, inconsistent and one data set fills all tabs of the browser. A lot of input can get lost that way.

Is there something that can be done to that regard?


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

Martin,
Why does the user need to be able to fill out the same form in multiple tabs?

I suppose you could use a map to give each tab a key and control things yourself. It seems awkward though. I think it is easier to enforce that the user doesn't use multiple tabs - you could do this with a unique token to make sure all requests come from the generated HTML.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Seam can handle multiple conversations; I assume it's via an embedded key or something (never looked; keep meaning to).
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
@David
I've looked it up, and it seems promising, though I don't think we will be changing/adding new framewrosk to pur project.

@Jeanne
Users actualy don't need to be able to fill out multiple forms. That's why we will probably go with a variation of your proposal, using some kind of flag witch form is currently in edit mode and the rest of forms will be in a kind of read only mode.

Thank you both for your thoughts.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I wasn't suggested you *use* Seam, I was suggesting you use its technique for managing multiple conversations.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session inconsistencies
 
Similar Threads
Minimal Javascript,,,
Session Timeout redirect to login page
Session Data Vs Session Overhead
managed-property and query string
session management in different tabs in same browser