How to get Session object?

2009-08-20 Thread Tiago Mesquita
Hi Everyone, So, i'm with a problem that maybe you guys can help me... i need to get the session object outside a class that extend RemoteServiceServlet.. like, i'll write one example here: public class Foo{ public User getLoggedUser(){ // How to get logged user here? if this class (Foo)

Re: How to get Session object?

2009-08-20 Thread Kamal Chandana Mettananda
One option: You will have to pass the Session instance into this class from the calling class; so that this class can use the session to retrieve the User. public class Foo{ public User getLoggedUser(final HttpSession session) { // retrieve it here } } HTH, Kamal