The source code of ShowParameters.java: import java.io.* ; import javax.servlet.* ; import javax.servlet.http.* ; import java.util.* ; // for Enumeration public class ShowParameters extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { doGet(request,response) ; } // doPost public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html") ; PrintWriter out = response.getWriter() ; Furniture.doHeader(out,"Show form parameters") ; out.println("This page is dynamically generated" +" by a Java servlet") ; out.println("<p>The names and values of the parameters" +" (in no particular order) were: <tt>") ; out.println("<ul>") ; // Parameters from form data Enumeration paramNames = request.getParameterNames() ; while (paramNames.hasMoreElements()) { String p = (String)paramNames.nextElement() ; out.print("<li>" + p + ": ") ; out.println(request.getParameter(p)) ; } out.println("</ul></tt>") ; // Any cookies? Cookie[] cookies = request.getCookies() ; if (cookies == null) { out.println("No cookie data were received") ; } else { int ncookies = cookies.length ; out.println("Cookie names and values: <ul><tt>") ; Cookie cookie ; for (int i=0 ; i<ncookies ; i++) { cookie = cookies[i] ; out.print("<li>" + cookie.getName() + ": ") ; out.println(cookie.getValue()) ; } } out.println("</ul></tt>") ; Furniture.doFooter(out) ; } // doGet } // class