You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Viral_Thakkar <Vi...@infosys.com> on 2003/12/08 10:33:53 UTC

downloading of files

Is there any struts support to download the files?

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: downloading of files

Posted by Kwok Peng Tuck <pe...@makmal.net>.
I assume that your Action prompts the user (the guy using the browser) 
to save the file ?

Viral_Thakkar wrote:

>Is there any struts support to download the files?
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: downloading of files

Posted by Firat TIRYAKI <fi...@pleksus.com.tr>.
what exactly you want to do? please be more spesific.

F.

----- Original Message ----- 
From: "Viral_Thakkar" <Vi...@infosys.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, December 08, 2003 11:33 AM
Subject: downloading of files


Is there any struts support to download the files?

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: downloading of files

Posted by Derek Clarkson <dc...@waterwerks.com.au>.
Hi, 
	I don't know if this is a good way or not, but heres what I did:

httpServletResponse.setContentType("text/tsv"); //Whatever mime type you need.
PrintWriter out = httpServletResponse.getWriter();

...Use the print writer to create the download file ....

out.close();
return null;

When a user clicks on the link for this action, it creates and downloads the 
file, but doesn't leave the page the user is currently on.

cio
Derek


On Monday 08 December 2003 20:33, Viral_Thakkar wrote:
> Is there any struts support to download the files?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

-- 
Regards,
Derek Clarkson

.O. Analyst/Programmer
..O Waterwerks Pty Ltd
OOO Melbourne, Australia


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org