Hi Philip,

You need not create a new session for every tab.
Rather what you can do is, ensure that every request from a new tab passes a
Id to the gwt module and use your session like

...request.setAttribute( 'SESSION_DATA_'+Id, sessionData )

since your client is passing the id, it can use the same id at a later stage
to retrieve the data (i used a random number). But i doubt if this can be
used in distributed server envrionment where sessions are not replicated
across all the servers.

Thanks
Sudeep
On Mon, Oct 26, 2009 at 9:25 PM, Thomas Broyer <[email protected]> wrote:

>
>
>
> On 26 oct, 12:38, "[email protected]"
> <[email protected]> wrote:
> > ?
> >
> > Thanks, Paul, but I fear I don't (quite) understand.
> > Are you saying that I have to start FF with command line options in
> > order to be able to create different session IDs for different tabs?
> > Even if that should be so, I can hardly communicate this information
> > to all our clients and ask them to start their FF with those options
> > (let alone those clients that are using different browsers, like IE 8
> > for example).
>
> Are your clients *expected* to open the app twice side-by-side with
> different credentials? Most webapps do not allow it (including Google
> apps and apps hosted on AppEngine, as well as Yahoo! and Microsoft
> apps, to cite a few).
>
> > Isn't there a way of getting different session IDs for different tabs?
>
> Sure: do not use cookies to maintain sessions (servlet containers
> usually have a way of disabling cookie-based sessions).
>
> But you'd better not use sessions at all if you can: if your GWT app
> is a single-page app, then the page itself can maintain the "session"
> without the need for cookies: just pass the credentials (generally an
> authentication ticket that the server generated in response to a
> request to a "login" servlet) with all your calls (e.g. use
> RequestBuilder.addHeader, and if you use RPC, use the
> RpcRequestBuilder to do the same, if you use a GWT 2.0 milestone or
> similar).
> See Ray Ryan's talk at Google I/O last spring:
>
> http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html
> (look for "statelessness")
> You can also google for "REST", "RESTful" or "RESTful web services".
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to