Dear All,

What I want to do is read the files from database and let the user to
download them.

In the showcase example, I find the following configuration:

       <action name="download2" class="
org.apache.struts2.showcase.filedownload.FileDownloadAction">
           <param name="inputPath">\images\struts-gif.zip</param>
           <result name="success" type="stream">
               <param name="contentType">application/zip</param>
               <param name="inputName">inputStream</param>
               <param name="contentDisposition">filename="struts-gif.zip
"</param>
               <param name="bufferSize">4096</param>
           </result>
       </action>

But I may not know the filename, contentType, etc (because these files are
uploaded by the user).

Do anybody can tell me how to get the handler of result in the code so I can
set all these information?

Thanks very much,

Regards,

Zheng Shuai

Reply via email to