Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    29
    Vote Rating
    0
    daeo is on a distinguished road

      0  

    Question GWT Session Problem

    GWT Session Problem


    Hi,
    I know this is not the right place for GWT questions, sorry i have to put it here coz i don't know anywhere else that i can get help.

    I m doing some Session stuff using Ext GWT, but i even couldn't get a simple thing working. I m trying to get a HashMap from the Session, and save some values to the Map, and retrieve the values later on. What i did is creating RPC, on the server side, the implementation class, i write:

    Code:
    ...
       public HashMap getSessionMap(String key) {
          if (session.getAttribute(key) == null) {
                session.setAttribute(key, new HashMap());
            }
    
            // Return the HashMap
            return (HashMap) session.getAttribute(key);
       }
    
       public HttpSession getSession() {
          return this.getThreadLocalRequest().getSession();
       }
    ...
    on the client side, i call this service, get the map, and put values in the map.

    But it seems that i get a new map each time i call the service, and there's always only one value in the map. After debugging, i found it's wierd that the HashMap gets created only once(the first time the session attribute is checked), but the map is always empty. I m very confused, the session seems have had the map, but the map can not save any values.

    Anyone can help me? please give me some advise about how the Session in GWT should be used, can i save a JavaBean object to the Session?

    Any help will be appreciated! Thank you very much!!


    Best Regards

  2. #2
    Ext User
    Join Date
    Feb 2009
    Posts
    29
    Vote Rating
    0
    daeo is on a distinguished road

      0  

    Default


    i sort of solved the problem. this time, i tried to send value to the Servlet and save them in a map instead of getting the HashMap from the Servlet, it works now. I m wondering if this is because the server cannot get the HashMap from Servlet, or any other reasons?

    I would also like to get the Map at the client side though, is this a wrong though?

    Cheers

  3. #3
    Ext User
    Join Date
    Feb 2009
    Posts
    29
    Vote Rating
    0
    daeo is on a distinguished road

      0  

    Default


    still have problem. when save to a map in the session, if i kill the session, the first time is always a failure, in which there's only one record can be retrieved from the map, after the first time, it works well.

    i assume that the map or the session is not created properly in the first time, but why this is happening? any idea??

  4. #4
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Posts
    2
    Vote Rating
    0
    Oscar Porto is on a distinguished road

      0  

    Default Same problem

    Same problem


    Hello,

    I'm having the same problem.
    Have you already solved it?

    thank you

Thread Participants: 1