Re: JSessionID Confusion
the only cgi var which could store this information is QUERY_STRING why not use session to store session info such as SessionID? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: "Ryan O'Hara" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, October 24, 2006 4:43 PM Subject: Re: JSessionID Confusion > Thanks, Dave. One more question - How can you tell Tomcat to assign > sessions based on session IDs defined in CGI variables? > > -Ryan > > On Oct 23, 2006, at 4:04 PM, David Smith wrote: > >> Short answer: no. Tomcat doesn't have any knowlege of how many >> windows client-side are sharing the same session cookie. As long >> as the same session cookie is returned, tomcat see's just one client. >> >> The issue can be mitigated by storing state information in the >> request via hidden form fields or GET params on the page links. >> >> --David >> >> Ryan O'Hara wrote: >> >>> Is there anyway to create JSessionIDs per window rather than per >>> browser? I am having the problem of when you open multiple tabs >>> within a browser, and enter two simultaneous queries, the results >>> returned are corrupted. Any suggestions? Thanks for the help. >>> >>> -Ryan >>> >>> - >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >> >> >> - >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: JSessionID Confusion
Thanks, Dave. One more question - How can you tell Tomcat to assign sessions based on session IDs defined in CGI variables? -Ryan On Oct 23, 2006, at 4:04 PM, David Smith wrote: Short answer: no. Tomcat doesn't have any knowlege of how many windows client-side are sharing the same session cookie. As long as the same session cookie is returned, tomcat see's just one client. The issue can be mitigated by storing state information in the request via hidden form fields or GET params on the page links. --David Ryan O'Hara wrote: Is there anyway to create JSessionIDs per window rather than per browser? I am having the problem of when you open multiple tabs within a browser, and enter two simultaneous queries, the results returned are corrupted. Any suggestions? Thanks for the help. -Ryan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSessionID Confusion
Ryan, > Is there anyway to create JSessionIDs per window rather than per > browser? I am having the problem of when you open multiple tabs within > a browser, and enter two simultaneous queries, the results returned are > corrupted. Any suggestions? Thanks for the help. I have an application that allows the user to perform searches and paginate through the results. Since the search really only needs to be performed once, pagination can be as simple as picking a segment of the results (stored in the session) and displayed on the screen. I store the query that was performed as well as a "token" which is generated when the query is created. I place this token in all of the URLs on the page (most importantly, the ones involved with pagination). If a request comes into the server including a token, I check the token against what I have in the session. If the tokens match, I skip the search. If they do not match, I re-run the search and re-set the token. Rinse, repeat. In your case, you might want multiple simultaneous paginating queries, though I'm not exactly sure why. You could adopt a similar approach using a List of queries (using the same session key, I would imagine), each with separate tokens for the windows. The only problem with an implementation like this is that it is very hard to decide when you are "finished" with a query, and that it's okay to purge it from the session. That is left as an exercise for the reader ;) Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: JSessionID Confusion
Short answer: no. Tomcat doesn't have any knowlege of how many windows client-side are sharing the same session cookie. As long as the same session cookie is returned, tomcat see's just one client. The issue can be mitigated by storing state information in the request via hidden form fields or GET params on the page links. --David Ryan O'Hara wrote: Is there anyway to create JSessionIDs per window rather than per browser? I am having the problem of when you open multiple tabs within a browser, and enter two simultaneous queries, the results returned are corrupted. Any suggestions? Thanks for the help. -Ryan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSessionID Confusion
> From: Ryan O'Hara [mailto:[EMAIL PROTECTED] > Subject: JSessionID Confusion > > I am having the problem of when you open multiple tabs > within a browser, and enter two simultaneous queries, > the results returned are corrupted. Sounds like an application bug - keeping values/references in the session when they actually pertain to the request. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSessionID Confusion
Is there anyway to create JSessionIDs per window rather than per browser? I am having the problem of when you open multiple tabs within a browser, and enter two simultaneous queries, the results returned are corrupted. Any suggestions? Thanks for the help. -Ryan - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]