can u tell me how to send the Url to the server using Http Get method... Here i m trying to insert a name into the databse .If i execute the below
showing code there is no response (i.e) no value is insert in to the database... i think the error is is in the Http meythod ..Would u tel me pls how to Correct it.... With ragards, Raghav.S My Code: package simpl.http1; import java.io.IOException; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class simplhttp1 extends Activity { /** Called when the activity is first created. */ Button enter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); enter=(Button)findViewById(R.id.enter1); enter.setOnClickListener(new OnClickListener(){ public void onClick(View v) { openconn(); } }); } public void openconn() { String str11="Raghul"; String feed_url=" http://localhost:8080/Serv1/servlet/Servlet1?st1="+str11; HttpClient client=new DefaultHttpClient(); HttpGet siteRequest = new HttpGet(feed_url); HttpResponse httpResponse = client.execute(siteRequest); } } } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---