« Return to Thread: download file

Re: download file

by PEGASUS84 :: Rate this Message:

Reply to Author | View in Thread

my action  is this:
public class FileDownload extends ActionSupport {
       
       InputStream inputStream;


   public void setInputStream(InputStream s){inputStream=s;}
   public InputStream getInputStream(){return inputStream;}

   public String execute(){
   return "sendFile";
   }
}
and in Struts.xml i've this:

<action name="fileDownload" class="action.FileDownload" >
               <result name="sendFile" type="stream">
               ${contentType}
               </result>
       </action>

i wish to download a file

 « Return to Thread: download file