Display parameters passed to JSP

Some times the list of parameters passed to a JSP page can be quite long. Of course, you can display the parameters in the address bar by changing your method to POST, but when you have a lot or parameters, this can be cumbersome. The following code will allow you to display all parameters provided; each on their own line.

        <% 
            java.util.Enumeration params = request.getParameterNames(); 
            while(params.hasMoreElements()) { 
                String paramName = (String) params.nextElement(); 
                String paramValue = request.getParameter(paramName); 
        %>
                <%=paramName%> has a value <%=paramValue%><br />
        <% 
            } 
        %>