One more thing..the file to be downloaded is dynamic generated...so I cannot put it in the war file..if it can be put in war file..the problem is solved...
If the file is generated dynamicly you can write to Content to response.getQutputstream(). Don't forget to set the ContentType and the Header.
Header: response.setHeader("Content-Disposition","multi-part attachment;filename=\"yourFile.zip\";");
Hope this helps
yeah..thanks a lot..it works now...However, if the file name is Chinese, it fails to recognize the file name. DOes anyone know how to set the encoding in the header?? I've tried to set the encoding in the setContentType method. It doesn't work either..