Thank you for the idea.
Here is the java code I use in the servlet and it works nicely :

protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {

        ServletContext context = this.getServletContext();

        String fileName = "name.csv";
        String javaServerPage = "page.jsp":

        response.setContentType("application/x-download");
        response.setHeader("Content-Disposition", "attachment;filename=" +
fileName);

        OutputStream stream = response.getOutputStream( );
        OutputStreamWriter writer = new OutputStreamWriter(stream);
        BufferedWriter buffer = new BufferedWriter(writer);

        // Write things in OutputStream
        writer.write(...);

        buffer.flush();
        writer.flush();
        buffer.close();
        writer.close();
        buffer = null;
        writer = null;

        RequestDispatcher dispatcher = context.getRequestDispatcher
(javaServerPage);
        dispatcher.forward(request, response);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to