FileDocCategorySizeDatePackage
CsvServlet.javaAPI DocExample915Wed Jul 07 15:25:32 BST 2004com.oreilly.strutsckbk.ch07

CsvServlet

public class CsvServlet extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        doPost(request, response);
    
protected voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        response.setContentType("text/csv");
        PrintWriter out = response.getWriter();
        out.write("\"Every\",\"good\",\"boy\",\"does\",\"fine\"\r\n");
        out.write("\"face\",\"in\",\"the\",\"space\",\"dude\"\r\n");
        out.flush();