How to Set Request Headers like "User Agent, Host, Connection" in a servlet
843841Aug 30 2006 — edited Sep 2 2006Hi all,
I have a question regarding servlets.
How can we set the Headers in a Http request that we send FROM a servlet?
For example, a request from a Html Page has the following headers:
"GET / HTTP/1.1
Host: www.yahoo.com
User-Agent: Opera/9.00 (Windows NT 5.1; U; en)
Accept-Encoding: en
Connection: close"
Is it possible to include this header inside a request I send FROM a servlet to a certain URL?
Thanks for any help