JSP Addressbook app for VIP Express (circa Jun 2002)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

39 lines
1.2 KiB

  1. // RequestTestServlet.java
  2. package com.bullseyecomputing.test;
  3. import java.io.*;
  4. import java.util.*;
  5. import javax.servlet.*;
  6. import javax.servlet.http.*;
  7. public class RequestTestServlet extends HttpServlet {
  8. public void doGet(HttpServletRequest request, HttpServletResponse response)
  9. throws ServletException, IOException {
  10. Enumeration arglist;
  11. String name, value;
  12. PrintWriter out = response.getWriter();
  13. response.setContentType("text/html");
  14. out.print("<html>\n<head>\n");
  15. out.print(" <title>Request Parameter Test</title>\n");
  16. out.print(" <link rel=\"stylesheet\" href=\"style/common.css\"");
  17. out.print(" type=\"text/css\">\n");
  18. out.print("</head>\n<body>\n");
  19. out.print(" <h3>Request Parameter Test</h3>\n");
  20. out.print(" <table class=\"third\">\n ");
  21. out.print(" <thead>\n <th>Name</th>\n");
  22. out.print(" <th>Value</th>\n </thead>\n");
  23. arglist = request.getParameterNames();
  24. while(arglist.hasMoreElements()) {
  25. name = arglist.nextElement().toString();
  26. value = request.getParameter(name);
  27. out.print(" <tr>\n <td>" + name + "</td>\n ");
  28. out.print("<td>" + value + "</td>\n </tr>\n");
  29. }
  30. out.print(" </table>\n</body>\n</html>\n");
  31. }
  32. }