• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple browser windows corupting sessions

 
Sri Anand
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the application i am currently working on sessions are getting corrupted, when users opens multiple browsers to copy past data, the problem getting worst due to forms being in session scope are rewriting the wrong records.

We are using struts1.1 will struts token resolve this issue ? what are other ways to solve the problem
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although you've not provided enough information to find a solution, but with the available information, using Request scope for form beans seems a solution...
 
Sri Anand
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What we are using is exactly this !!
http://struts.apache.org/1.x/struts-extras/dispatchValidator.html

The actual problem is user is opening 2 browser instances; when he is filling in the applicaiton form and session of one instance is getting into other this rewriting some wrong records
 
Sri Anand
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sri Anand wrote:What we are using is exactly this !!
http://struts.apache.org/1.x/struts-extras/dispatchValidator.html

The actual problem is : user is opening 2 browser instances ,opening a old and new applications; when he is filling in the new application form, session of old applicaition is overriding the new applicaiton instance and modifying the wrong records
. infact when multiple browsers are opened like this session of last one is taking prcedence over others !!!

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's just how sessions work--if you want to allow multiple conversations on the same session there are some frameworks that provide this (I'm thinking primarily of Seam), although I suspect its techniques could be adapted.
 
Sri Anand
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean if i use request scope even then i will come across this problem ? Will struts tokens be of any use here
 
Sri Anand
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put struts tokens on all pages where i add or edit the record; on each page action( for both previous and next) i have save token and checking for the token in the next action; if session were cloned and user is trying to work on multiple sessions or user used CNTRL +N tokens don't match user is sent to error page.
looks good with IE8,IE6,IE7.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic