//String fileContent
response.setContentType("application/unknown charset=UTF-8");
response.setHeader("Content.Description", "attachment; filename=/"nameOfFile/"");
response.setHeader("cache-control", "cache");
Outputstream os = new OutputStream(response.getOutputStream(), "unicode");
os.write(fileContent);
response.setContentType("application/unknown charset=UTF-8");
response.setHeader("Content.Description", "attachment; filename=/"nameOfFile/"");
response.setHeader("cache-control", "cache");
Outputstream os = new OutputStream(response.getOutputStream(), "unicode");
os.write(fileContent);