Reputation: 599
I am developing an application which load jsp page in webview.It send the parametres to the jsp oage using Post method.I am creating a string of parameter & passing to post method like this
w1.postUrl(protocol +"://"+host_ip+":"+portnumber+"/"+FOLDER+"/folder/data.jsp", EncodingUtils.getBytes(params, "BASE64"));
params="?username="+uname+"&password="+password;
Now i have two questions
Upvotes: 0
Views: 1336
Reputation: 2703
Use an HttpPost object to set the paramters:
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(blobUploadURL);
String param="param";
httpPost.setParameter("parameter, param);
try {
HttpResponse response = httpClient.execute(httpPost);
statusCode = response.getStatusLine().getStatusCode();
}
Upvotes: 1