Yap it's possible.First of all ypu just do a .csv file and store it.
Then write your code
response.setContentType("text/csv");
response.setHeader("Content-Disposition","filename=\"test.csv\"");
like this in your jsp page....
If you are using any javascript then in onClick function you can write your code like this
jsp page with a button, the javascript onClick() for this button is:
if(flag=="CSV")
{
var fileName = "/eriapps/frameset.do?action=CsvErricsson";
var win1 = window.open(fileName,"_blank",'resizable=no,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no'); } fileName points to a servlet, SO the servlet class has the following code: theResponse.setContentType("text/csv"); theResponse.setHeader("Content-Disposition","filename=\"test.csv\""); It is a sample example.You can cahnge it as your required file name and all. Thanks Gopal Das