• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in file downloading in struts 2.0  RSS feed

Manish Shinde
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!