example:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
if(request.getParameter("d
ownload")!
=null){
InputStream in =generateCSVFile(request);
response.setContentType("a
pplication
/csv");
OutputStream out=response.getOutputStre
am();
int k=-1;
byte[] buf = new byte[10000];
while((k=in.read(buf)) >0){
out.write(buf,0,k);
}
}else{
response.getOutputWriter()
.write("
ml> ....
Download csv ...