hi
i checked on tapestry and tried to use httpurlconnection to log in to the
tapestry login form programmatically but it gives me errors.
what is the form post url? im thinking tapestry's framework prevents it
logging in via httpurlconnection. please correct me if i am wrong.
and if there is direct form post url, are there any other things i need to
set in the httpurlconnection or something.
this is my code
URL url = new URL("http://URL/login.loginform");
HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();
httpcon.setDoOutput(true);
httpcon.setInstanceFollowRedirects(false);
String data = "email=" + URLEncoder.encode(username, "UTF-8") + "&password="
+ URLEncoder.encode(password, "UTF-8") + "&Submit=Login&" +
URLEncoder.encode("t:formdata", "UTF-8") + "=FORM_DATA";
OutputStreamWriter wr = new OutputStreamWriter(httpcon.getOutputStream());
wr.write(data);
wr.flush();
wr.close();
httpcon.disconnect();
please advise.
Website/Java Games: http://www.chitgoks.com
Java Casino Games: http://chitgoks.tripod.com
Photo Gallery: http://gallery.chitgoks.com
My Blogs:
http://tech.chitgoks.com
http://wuhtevah.chitgoks.com
http://disneyusa.blogspot.com