Hi,

I am downloading an excell sheet with following headers

downloadServlet.java

{

byte[] fileToSend = baos.toByteArray();
res.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
res.setContentLength(fileToSend.length);
res.getOutputStream().flush();
res.setCharacterEncoding("UTF-8");
res.setHeader("CacheControl", "no-cache");
res.setHeader("Pragma", "no-cache");
res.setHeader("Expires", "-1");
res.setHeader("Content-disposition", "attachment; filename=hotel.xls");
 res.getOutputStream().write(fileToSend);

}

it works fine dev mode and am able to download and see content with file
name as hotel.xls.

But when deployed to app engeine server, it downloads file named
downloadServlet.xlsx instead of hotel.xls. because of the file type
difference (xlsx instead of xls), i am not able to open the file correctly
and see the content.

Can somebody suggest why this file type difference happens after deployment
?



Deepak Singh

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to