boolean emptyEnum = false; if (! paramNames.hasMoreElements( )) emptyEnum = true; //set the MIME type of the response, "text/html" response.setContentType("text/html"); //use a PrintWriter to send text data to the client java.io.PrintWriter out = response.getWriter( ); //Begin assembling the HTML content out.println("<html><head>"); out.println("<title>Submitted Parameters</title></head><body>"); if (emptyEnum) ...{ out.println( "<h2>Sorry, the request does not contain any parameters</h2>"); } else ...{ out.println( "<h2>Here are the submitted parameter values</h2>"); } while(paramNames.hasMoreElements( )) ...{ parName = (String) paramNames.nextElement( ); out.println( "<strong>" + parName + "</strong> : " + request.getParameter(parName)); out.println("<br />"); }//while out.println("</body></html>"); } // doPos