I created a JSP this morning that prints out the equivalent of most traditional CGI parameters. Sometimes I use these to debug a problem, other times I use them within JSP/servlet code for other non-debug purposes.
Here's the Java source code for my JSP CGI page, which I named cgiParams.jsp. As you can see, most of these variables come from the JSP request object: