Hi,
I'm trying to login to a website using HTTP Post. I did the follwoing in my code
//Constructed the POST parameters as below
String content = "webctid"+ "=" + URLEncoder.encode("skasthur", "UTF-8");
content += "&" + "password" + "=" + URLEncoder.encode("User2031", "UTF-8");
//Using HTTPURLConnection as below
HTTPURLConnection urlConn = (HttpURLConnection)(new URL("--my target url----").openConnection());
//servletOutput.println("After connection open");
urlConn.setDoInput(true);
urlConn.setDoOutput(true);
urlConn.setRequestMethod("POST");