// 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(" Request Parameter Test\n"); out.print(" \n"); out.print("\n\n"); out.print("

Request Parameter Test

\n"); out.print(" \n "); out.print(" \n \n"); out.print(" \n \n"); arglist = request.getParameterNames(); while(arglist.hasMoreElements()) { name = arglist.nextElement().toString(); value = request.getParameter(name); out.print(" \n \n "); out.print("\n \n"); } out.print("
NameValue
" + name + "" + value + "
\n\n\n"); } }