• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Session duplicated

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

I have an application, basically a form which user submits to the database, when the user tries to open two different browsers of the same form and upon acting on the form, the data entered in the form gets updated with the last modified on, means the data gets updated with the data entered in the other window.

Kindly let me know if you have any solution

Thanks
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the two instances share cookies (depends upon not only the browser, but on how you create the new browser window) then they will share the session.
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Bear said is right but i dont see anything related to sessions here.

Rudresh, do you mean to say when you open a form in two different browsers and submit both, then the data updated is the one submitted by second one?
Can you please give more details?
[ September 26, 2007: Message edited by: Amol Nayak ]
 
rudresh kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
Let me give an example

let us say that currently there is a form which is saved and user is acting on the form further (let us say that this form is in status 'C'),
now user clicks for new browser (control N/file new window) log in the application with diff user and status of the form is 'A'.Now on save of this form the page gets updated with the previous page data and all the data is same as earlier page (even the status of the form changes to 'C')

Thanks
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rudresh...

Wait a sec...

I log into www.yahoomail.com and once I go to my In-Box I do a Cntrl-N and a new browser window pops up with my currently logged in session duplicated.

In that case how can I re-log in into the application as a different user?
[ September 27, 2007: Message edited by: siva kumar ]
 
rudresh kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

i had said control N as one example to open a new window faster (it can be file new window or clickin of IE icon), and then login with different user id..then start working . we can work with two different id's in Yahoo mail or any application for that matter.

for example i may be working with two of my own id's official and personal id in yahoo with two different windows, that does not mean that data in my offical mails gets replicated on my personal mails...

but for me it gets replicated that is the issue, if one user logs out then another one automatically gets logout when he does a action on the another one

Thanks
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Posted by Rudresh
HI,

i had said control N as one example to open a new window faster (it can be file new window or clickin of IE icon), and then login with different user id..then start working . we can work with two different id's in Yahoo mail or any application for that matter.

for example i may be working with two of my own id's official and personal id in yahoo with two different windows, that does not mean that data in my offical mails gets replicated on my personal mails...

but for me it gets replicated that is the issue, if one user logs out then another one automatically gets logout when he does a action on the another one



What your are talking is not always true, it varies from browser to browser.
[ September 28, 2007: Message edited by: Amol Nayak ]
 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lets see...

1) Session object is of the browser window ok's.
2) In the above reply cookie is mentioned but i guess in your case it doesn't come in play because yor never mentioned it and hence i am making the guess you are not using it by urself(i.e. explicitly for storing the state).

Since you are talking about sessions let us concentrate their it self:
1) Like i said before Session object is of the browser window of if you do ctrl+N or File-->New-->Window the same session object is used by both the windows so your condition bound to happen.

2) like is you are logged out of one window you will be logged out of the other one as well i.e if you are using the session object to check the state of the object.

3) And the form data will be replicated if that is in session.

4) If your not properly logging out of the other window (created as above) add some how log-in again the both the user will get changed or should i say the information in the session object will be replaced by the new information and both windows is now using the same new information.

5) Now if you open the new browser by clicking on new window than different session object is created you can check that by trying to retrive the logged in user information before putting the new one their.

Please reply back if you are getting the information their also.

I'll recommend you to do the proper testing and find out the state of session in each of these senerio.
[ September 28, 2007: Message edited by: subodh gupta ]
 
Popeye has his spinach. I have this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic