jQuery in Action, 3rd edition
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 REST with Spring (video course) this week in the Spring 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

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.


Thanks in advance

I agree. Here's the link: http://aspose.com/file-tools
subject: problem in file downloading in struts 2.0
It's not a secret anymore!