I want to create and Dowload a CSV file using Struts2. I have created the csv file using DataOutput Stream and I have copied it into InputStream. The file is downloading but data is not there in the downloaded file. Can any one help me out of this problem. I am struggling from almost two days. Everything is coming good except writing data into the file.