> 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).
Ok, sorry in advance, I'm sort of a novice at all of this, but why not? Also, let's just theoretically say that someone else (not me, of course), just blindly spit back the response. Is it possible to tell the client to treat the response in the context of www.otherdomain.com instead of www.mydomain.com? Thanks for your prompt reply - 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] ---- End Original Message ---- 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]