Could you please help me with the configuration in struts2 for file download.
The following is the scenario that I have:
The database contains the filename, content type and binary stream of the file.
1. The JSP is populated with a list of filenames from database as hyperlink.
1.Click on a filename from JSP.Retrieve the filename in action class from JSP.
2. From the action class, the filename is sent as a parameter to the ejb layer that actually will retrieve the bytes of the corresponsding filename.
3. Show a dialog box to the user either to open the file or save the file in disk.
I have tried to use the following configuration in struts. xml file, but could not achieve the desired result.
Please give your ideas.
The content type that is the database can be of any type, image,pdf,excel,txt,etc
Joined: Jan 27, 2009
i found the problem, the inputName I have specified is incorrect.I have changed to inputStream and it works.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com