Hello,
I am writing a servlet on www.mydomain.com.
The servlet POSTs data to www.otherdomain.com
using HttpClient and associated classes. Then,
www.otherdomain.com sends back a response,
<html>
<head></head>
<body onload="document.forms[0].submit();">
<form name=f
action="/otherdomainfolder/dostuff.cgi"
method="post">
<input name="input1" value="val1" type="hidden">
<input name="input2" value="val2" type="hidden">
</form>
</body>
</html>
Unfortunately, this generates a 404 error on the
client machine because its still referencing
www.mydomain.com and it should be considering
this response in the context of
www.otherdomain.com. How do I make that so?
Much thanks for your time, - Dave
ps - I handle the response from
www.otherdomain.com like this:
// Read the response body.
InputStream in =
postMethod.getResponseBodyAsStream();
BufferedReader br = new
BufferedReader(new InputStreamReader(in));
String nextLine = "";
String responseBody = "";
while ((nextLine = br.readLine()) != null) {
responseBody += nextLine.trim();
}
out.println(responseBody);
Care2 make the world greener!
Eighty-six nations have signed the international Framework Convention on Tobacco
Control. Help get the U.S. on the list! http://www.care2.com/go/z/10840/1060
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]