Multi-part Data Example
public void doPost(HttpServletRequest req,
HttpServletResponse resp) {
resp.setContentType(“text/html”) ;
PrintWriter out = resp.getWriter() ;
out.println(“<html><head></head><body>”) ;
Vector students = new Vector() ;
String course = parseFormData(students, req) ;
out.println(“course: ” + course + “<br>”) ;
out.println(“students: <br>”) ;
out.println(“<table border cellspacing=0 cellpadding=5>”) ;
for (int i = 0 ; i < pets.length ; i++)
out.println(“<tr><td>” + (String) students.get(i) + “</td></tr>”) ;
out.println(“</table>”) ;
out.println(“</body></html>”) ;