File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes problem in file downloading in struts 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in file downloading in struts 2.0" Watch "problem in file downloading in struts 2.0" New topic
Author

problem in file downloading in struts 2.0

Manish Shinde
Ranch Hand

Joined: Mar 30, 2011
Posts: 39
I have some facing some problems in downloading the file.
Earlier I was getting following error :

Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.

Which is resolved when I specified name of method(getInputStream()) in action tag of struts.xml. This getInputStream() wiil return InputStream object.

Now when I clicked on download I m getting blank page with following URL

http://localhost:8080/struts2/JSP/download.action?filePath=D%3A%2Fmanish235%2Fstruts2%2Fbuild%2Fweb%2FWEB-INF%2F479391_rp_rp023_objctn_lr.PDF in browser.

If code is working that file should be saved in download folder in disk but I didn’t get the file in that location.

Then what could be the issue with the code? I didn’t get any error.

Following is code where I am uploading the file then I am downloading the same file.

1)UploadForm.jsp











Thanks in advance
Manish


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in file downloading in struts 2.0
 
Similar Threads
liferay struts portlet
download file in struts2
File upload problem in struts 2 (emoving file attachment)
File Uploading Problem - Argument miss match
Dowloading a file from a a struts 2 web application