Dear Folks,
I try to issue a request to a servlet in the same domain by using com.google.gwt.http.client.RequestBuilder in the liferay.
However, I got a java.lang.UnsatisfiedLinkError, I do not know how to fix it (I google a lot but I can find anything useful to fix it)
Any hint I will very appreciate.
Thanks for you help.
Tony
Here is the code:
JSONObject input = new JSONObject();
input.put(“action”, “listAllActiveBabies”);
String url = “”;
try{
url = URLDecoder.decode(“/delegate/library?type=json”, “UTF-8”);
System.out.println(“url=”+url);
}
catch(Exception e)
{
}
RequestBuilder rb = null;
rb = new RequestBuilder(RequestBuilder.POST,url);
rb.setTimeoutMillis(5000);
rb.setRequestData(input.toString());
try {
rb.sendRequest(input.toString(),new RequestCallback() {
public void onResponseReceived(Request request,
Response response) {
liferayIPC.sendEvent("sayHi", response.getText());
}
public void onError(Request request,
Throwable exception) {
// TODO Auto-generated method stub
}
});
} catch (RequestException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}