hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tatiana Lloret Iglesias" <tllor...@gmail.com>
Subject Download a .zip through https
Date Thu, 25 Oct 2007 17:23:23 GMT
 Hi all,

in my jsp i have a link which is linked with a .zip under https.

When i click on the link i should have the possibility of opening that .zip
to save it locally

I have the following source code which works but i don't know what to do
with the InputStream in ....

HttpClient client = new HttpClient();

HostConfiguration host = client.getHostConfiguration();
host.setHost(new URI("https://www.host.com", true));

new AuthScope(host.getHost(), 443,AuthScope.ANY_REALM),
new UsernamePasswordCredentials("xxxx", "ddddd")

get = new GetMethod("https://www.host.com/dd/ss/ee.zip");

get.setDoAuthentication( true );

// execute the GET
int status = client.executeMethod( get );

//get the resonse as an InputStream
InputStream in =

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message