FileDocCategorySizeDatePackage
ShowParameters.javaAPI DocExample1123Mon May 01 14:41:50 BST 2000None

ShowParameters

public class ShowParameters extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        showRequestParameters( request, response );
    
voidshowRequestParameters(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        response.setContentType("text/html");
        PrintWriter out = response.getWriter(  );

        out.println(
          "<html><head><title>Show Parameters</title></head><body>"
          + "<h1>Parameters</h1><ul>");

        for ( Enumeration e=request.getParameterNames(  );
              e.hasMoreElements(  ); ) {
            String name = (String)e.nextElement(  );
            String value = request.getParameter( name );
            if (! value.equals("") )
                out.println("<li>"+ name +" = "+ value );
        }

        out.close(  );