String parms = "dateIn=29.01.2003" + "&beschIn=just a test";
byte[] bytes = parms.getBytes();
//Byte wird gebraucht f?r Output
// Create a URL pointing to the servlet or CGI script and open an HttpURLConnection on that URL
URL url = new URL("http://chr78939:50001/cgi-bin/formsave.pl");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
// Indicate that you will be doing input and output, that the method is POST, and that the content
// length is the length of the byte array
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod("POST");
con.setRequestProperty("Content-length", String.valueOf(bytes.length));
// Write the parameters to the URL output stream
OutputStream out = con.getOutputStream();
out.write(bytes);
out.flush();
// Read the response
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while (true) {
String line = in.readLine();
if (line == null) break;
System.out.println(line);
}
in.close();
out.close();
con.disconnect();
it works fine, but my question is: is this tool also working by a https site ? or what have i to change ? (maybe you got a good web-site) thx a lot