You should not blindly relay a server's response directly to the client if you are not bahaving like a good HTTP proxy (not even a proxy does it blindly actually, it processes the headers). You should rather parse and interprete the server's response and craft a response suitable for your client out of it. In your case this means parsing HTML, which is out of the scope of HttpClient since HTML is part of the HTTP message body.
Odi
D Alvarado wrote:
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?
-- _________________________________________________________________ NOSE applied intelligence ag
ortwin glück [www] http://www.nose.ch software engineer [email] [EMAIL PROTECTED] hardturmstrasse 171 [pgp key] 0x81CF3416 8005 zürich [office] +41-1-277 57 35 switzerland [fax] +41-1-277 57 12
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]