Displaying Raw Multi-part Data
public class MultiPart extends HttpServlet {
public void doPost(HttpServletRequest req,
HttpServletResponse resp) {
resp.setContentType(“text/html”) ;
PrintWriter out = resp.getWriter() ;
out.println(“<html><head></head><body>”) ;
String contentType = req.getContentType() ;
out.println(“content type:<br>” + contentType + “<br>”) ;
BufferedReader in = new BufferedReader(req.getReader()) ;
String line = in.readLine() ;
out.println(line + “<br>”) ;
out.println(“</body></html>”) ;