One of the beatiful things of GWT is that you do not need a server side session. You can make the server stateless and keep track of application state at the client side. So if you need an object set after login, just save it in your entery point or in a global accessible object (static). When ever you want to authorize user actions at the server, pass only a token. At login return a token from the server to the client. Make sure to save this token in a table on the server. Then whenever a user performs a request, send the token along with the request and validate the token on the server side. This way your server is stateless and very fast. In a cluster you are not bound to a specific server and that has all kinds of advantages.
Or to keep it short: track state at client. Regards, Arjan On 15 sep, 07:43, "Manik Chand" <[EMAIL PROTECTED]> wrote: > Hi, > > Your question is not clear. > Please write in detail. > You are asking: - How to save Object in Session? > > for storing any object in session you have to access HttpSession Object. > To do that use following code. > HttpSession sessionObj = getThreadLocalRequest().getSession(); > > And now if you need Object at client then you should write > method in the class which extends "RemoteServiceServlet"; > > But that object must be serialized other wise you cant get that object. > > On 9/15/08, Sebastien <[EMAIL PROTECTED]> wrote: > > > > > On client side, you can use a static variable to store your data. > > > On 15 sep, 05:32, "Ian Petersen" <[EMAIL PROTECTED]> wrote: > >> On Sun, Sep 14, 2008 at 11:00 PM, hezjing <[EMAIL PROTECTED]> wrote: > >> > What I want is how to access the session from the client code? > > >> Impossible. The session exists on the server only. > > >> Ian > > -- > Manik Chand > Software Engineer > Exact Software Pvt. Ltd. > 403, 4th Floor, Accord Complex, > Station Road, > Goregaon(East), > Mumbai - 400063 > Cell No. : +91 9220984430www.exact-solutions.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
