1. Include the following inherit in the .gwt.xml file
<inherits name="com.google.gwt.http.HTTP"/>
public class ReadCSV extends HttpServlet{
String contents = "Hello";
response.setHeader("Content-Type", "application/vnd.ms-excel");
response.setHeader("Content-Length", String.valueOf(contents.length()) );
response.setHeader("Content-Disposition", "attachment; filename=\"" + "CSVReader.CSV" + "\"");
response.getWriter().write(contents);
response.getWriter().flush();
response.getWriter().close();
}
3. On the Click of the button Implement the click Handler and state the following