On Thu, 2007-10-25 at 19:23 +0200, Tatiana Lloret Iglesias wrote:
> 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 ....

Try reading from it.

Oleg


> Thanks!
> T
> 
> 
> HttpClient client = new HttpClient();
> 
> HostConfiguration host = client.getHostConfiguration();
> host.setHost(new URI("https://www.host.com";, true));
> 
> client.getState().setCredentials(
> 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 =
> get.getResponseBodyAsStream();


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to