Can anyone tell me why this does not work? (here is a very simplified version). There are two pages, the first one (test.html) contents a HTML form, the second one (test.php) should evaluate the parameters. I use the POST method. The parameters don't appear in the second page. Can somebody write a simple example that do it?
Very thankful,
Sam
doGet:
------------------------
OutputStream out = response.getOutputStream();
try {
URL u = new URL("http://someadr/test.html");
URLConnection uco = u.openConnection ();
response.setContentType(uco.getContentType());
InputStream in = uco.getInputStream();
DataInputStream data = new DataInputStream (new BufferedInputStream(in));
int b;
while ((b = data.read()) != -1)
out.write(b);
out.close();
}
doPost:
------------------------
OutputStream out = response.getOutputStream();
try {
URL u = new URL("http://someadr/test.php");
URLConnection uco = u.openConnection ();
response.setContentType(uco.getContentType());
InputStream in = uco.getInputStream();
DataInputStream data = new DataInputStream (new BufferedInputStream(in));
int b;
while ((b = data.read()) != -1)
out.write(b);
out.close();
Very thankful,
Sam
doGet:
------------------------
OutputStream out = response.getOutputStream();
try {
URL u = new URL("http://someadr/test.html");
URLConnection uco = u.openConnection ();
response.setContentType(uco.getContentType());
InputStream in = uco.getInputStream();
DataInputStream data = new DataInputStream (new BufferedInputStream(in));
int b;
while ((b = data.read()) != -1)
out.write(b);
out.close();
}
doPost:
------------------------
OutputStream out = response.getOutputStream();
try {
URL u = new URL("http://someadr/test.php");
URLConnection uco = u.openConnection ();
response.setContentType(uco.getContentType());
InputStream in = uco.getInputStream();
DataInputStream data = new DataInputStream (new BufferedInputStream(in));
int b;
while ((b = data.read()) != -1)
out.write(b);
out.close();