2014-11-24 50 views
-1
RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, URL.encode(url));     
try { 
builder.sendRequest(requestdata, new RequestCallback() {       

@Override       
     public void onResponseReceived(Request request, Response response) { 
     int result = response.getStatusCode();  
     System.out.println(result);   
     } 
    @Override 
     public void onError(Request request, Throwable exception) {              
     } 
     }); 
} catch (RequestException ex) {       
    Logger.getLogger(MainEntryPoint.class.getName()).log(Level.SEVERE, null, ex);      
} 

這是我的代碼發送請求。 我該如何處理根據此代碼的請求和響應我如何處理從Gwt到PHP和Vice Versa的請求和響應?

回答

0

代碼是否正確。請檢查url是否有端口號。您不應該在URL中佔用您的端口號。