// RequestTestServlet.java package com.bullseyecomputing.test; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class RequestTestServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Enumeration arglist; String name, value; PrintWriter out = response.getWriter(); response.setContentType("text/html"); out.print("\n
\n"); out.print("Name | \n"); out.print("Value | \n \n"); arglist = request.getParameterNames(); while(arglist.hasMoreElements()) { name = arglist.nextElement().toString(); value = request.getParameter(name); out.print("
---|---|
" + name + " | \n "); out.print("" + value + " | \n