• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in file downloading in struts 2.0

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

1)UploadForm.jsp











Thanks in advance
Manish


 
I'm not sure if I approve of this interruption. But this tiny ad checks out:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic