title: HttpServletRequest request = this.getThreadLocalRequest() return null?
body: <p>I want to get a Attribute of session in GWT app.  i get Session like this </p>
  
  <pre class="lang-java prettyprint-override"><code>HttpServletRequest request = this.getThreadLocalRequest();
  System.out.println("Check HttpServletRequest");       
  HttpSession session = request.getSession();
  </code></pre>
  
  <p>but <code>this.getThreadLocalRequest()</code> is always <code>null</code>. </p>
  
  <p>CODE :</p>
  
  <p>Client:</p>
  
  <pre class="lang-java prettyprint-override"><code>@RemoteServiceRelativePath("service.s3gwt")
  public interface getAttributeSession extends RemoteService 
  {
      String getSessionAttribute(String name);
  }
  
  public interface getAttributeSessionAsync 
  {
      void getSessionAttribute(String name, AsyncCallback&lt;String&gt; callback);
  }
  </code></pre>
  
  <p>Server: </p>
  
  <pre class="lang-java prettyprint-override"><code>import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpSession;
  import com.google.gwt.user.server.rpc.RemoteServiceServlet;
  import daTotNghiep.client.service.getAttributeSession;
  
  public class getAttributeSessionImpl extends RemoteServiceServlet implements getAttributeSession 
  {
      private static final long serialVersionUID = 1L;
  
      public String getSessionAttribute(String name) 
      {
      // TODO Auto-generated method stub
  
      HttpServletRequest request = this.getThreadLocalRequest();
      System.out.println("Check HttpServletRequest");
      if(request == null) System.out.println("SO BAD");
  
     //   HttpSession session = request.getSession();
     // System.out.println("ID session "+session.getId());
  
       return "";
      }
  }
  </code></pre>
  
  <p>When call method <code>getSessionAttribute()</code> I see that <code>this.getThreadLocalRequest()</code> always returns <code>null</code>. So Why? And how to fix it?</p>