FileDocCategorySizeDatePackage
PostParams.javaAPI DocExample816Tue Jan 25 10:45:14 GMT 2000None

PostParams

public class PostParams extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)

    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();

    if ("application/x-www-form-urlencoded".equals(req.getContentType())) {
      Enumeration enum = req.getParameterNames();
      while (enum.hasMoreElements()) {
        String name = (String) enum.nextElement();
        String values[] = req.getParameterValues(name);
        if (values != null) {
          for (int i = 0; i < values.length; i++) {
            out.println(name + " (" + i + "): " + values[i]);
          }
        }
      }
    }