opendap/dtswar/src/main/java/opendap/dts/DTSServlet.java
public void probeRequest(PrintStream ps, ReqState rs)
    {
        Enumeration e;
        int i;
        HttpServletRequest request = rs.getRequest();

        ps.println("####################### PROBE ##################################");
        ps.println("The HttpServletRequest object is actually a: " + request.getClass().getName());
        ps.println("");
        ps.println("HttpServletRequest Interface:");
        ps.println("    getAuthType:           " + request.getAuthType());
        ps.println("    getMethod:             " + request.getMethod());
        ps.println("    getPathInfo:           " + request.getPathInfo());
        ps.println("    getPathTranslated:     " + request.getPathTranslated());
        ps.println("    getRequestURL:         " + request.getRequestURL());
        ps.println("    getQueryString:        " + request.getQueryString());
        ps.println("    getRemoteUser:         " + request.getRemoteUser());
        ps.println("    getRequestedSessionId: " + request.getRequestedSessionId());
        ps.println("    getRequestURI:         " + request.getRequestURI());
        ps.println("    getServletPath:        " + request.getServletPath());
        ps.println("    isRequestedSessionIdFromCookie: " + request.isRequestedSessionIdFromCookie());
        ps.println("    isRequestedSessionIdValid:      " + request.isRequestedSessionIdValid());
        ps.println("    isRequestedSessionIdFromURL:    " + request.isRequestedSessionIdFromURL());

        ps.println("");
        i = 0;
        e = request.getHeaderNames();
        ps.println("    Header Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Header[" + i + "]: " + s);
            ps.println(": " + request.getHeader(s));
        }

        ps.println("");
        ps.println("ServletRequest Interface:");
        ps.println("    getCharacterEncoding:  " + request.getCharacterEncoding());
        ps.println("    getContentType:        " + request.getContentType());
        ps.println("    getContentLength:      " + request.getContentLength());
        ps.println("    getProtocol:           " + request.getProtocol());
        ps.println("    getScheme:             " + request.getScheme());
        ps.println("    getServerName:         " + request.getServerName());
        ps.println("    getServerPort:         " + request.getServerPort());
        ps.println("    getRemoteAddr:         " + request.getRemoteAddr());
        ps.println("    getRemoteHost:         " + request.getRemoteHost());
        //ps.println("    getRealPath:           "+request.getRealPath());


        ps.println(".............................");
        ps.println("");
        i = 0;
        e = request.getAttributeNames();
        ps.println("    Attribute Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Attribute[" + i + "]: " + s);
            ps.println(" Type: " + request.getAttribute(s));
        }

        ps.println(".............................");
        ps.println("");
        i = 0;
        e = request.getParameterNames();
        ps.println("    Parameter Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Parameter[" + i + "]: " + s);
            ps.println(" Value: " + request.getParameter(s));
        }

        ps.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
        ps.println(" . . . . . . . . . Servlet Infomation API  . . . . . . . . . . . . . .");
        ps.println("");

        ps.println("Servlet Context:");
        ps.println("");

        i = 0;
        e = servletContext.getAttributeNames();
        ps.println("    Attribute Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Attribute[" + i + "]: " + s);
            ps.println(" Type: " + servletContext.getAttribute(s));
        }

        ps.println("    ServletContext.getRealPath(\".\"): " + servletContext.getRealPath("."));
        ps.println("    ServletContext.getMajorVersion(): " + servletContext.getMajorVersion());
//        ps.println("ServletContext.getMimeType():     " + sc.getMimeType());
        ps.println("    ServletContext.getMinorVersion(): " + servletContext.getMinorVersion());
//        ps.println("ServletContext.getRealPath(): " + sc.getRealPath());


        ps.println(".............................");
        ps.println("Servlet Config:");
        ps.println("");

        ServletConfig scnfg = getServletConfig();

        i = 0;
        e = scnfg.getInitParameterNames();
        ps.println("    InitParameters:");
        while(e.hasMoreElements()) {
            String p = (String) e.nextElement();
            ps.print("        InitParameter[" + i + "]: " + p);
            ps.println(" Value: " + scnfg.getInitParameter(p));
            i++;
        }
        ps.println("");
        ps.println("######################## END PROBE ###############################");
        ps.println("");

    }
public void probeRequest(PrintStream ps, ReqState rs)
    {
        Enumeration e;
        int i;
        HttpServletRequest request = rs.getRequest();

        ps.println("####################### PROBE ##################################");
        ps.println("The HttpServletRequest object is actually a: " + request.getClass().getName());
        ps.println("");
        ps.println("HttpServletRequest Interface:");
        ps.println("    getAuthType:           " + request.getAuthType());
        ps.println("    getMethod:             " + request.getMethod());
        ps.println("    getPathInfo:           " + request.getPathInfo());
        ps.println("    getPathTranslated:     " + request.getPathTranslated());
        ps.println("    getRequestURL:         " + request.getRequestURL());
        ps.println("    getQueryString:        " + request.getQueryString());
        ps.println("    getRemoteUser:         " + request.getRemoteUser());
        ps.println("    getRequestedSessionId: " + request.getRequestedSessionId());
        ps.println("    getRequestURI:         " + request.getRequestURI());
        ps.println("    getServletPath:        " + request.getServletPath());
        ps.println("    isRequestedSessionIdFromCookie: " + request.isRequestedSessionIdFromCookie());
        ps.println("    isRequestedSessionIdValid:      " + request.isRequestedSessionIdValid());
        ps.println("    isRequestedSessionIdFromURL:    " + request.isRequestedSessionIdFromURL());

        ps.println("");
        i = 0;
        e = request.getHeaderNames();
        ps.println("    Header Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Header[" + i + "]: " + s);
            ps.println(": " + request.getHeader(s));
        }

        ps.println("");
        ps.println("ServletRequest Interface:");
        ps.println("    getCharacterEncoding:  " + request.getCharacterEncoding());
        ps.println("    getContentType:        " + request.getContentType());
        ps.println("    getContentLength:      " + request.getContentLength());
        ps.println("    getProtocol:           " + request.getProtocol());
        ps.println("    getScheme:             " + request.getScheme());
        ps.println("    getServerName:         " + request.getServerName());
        ps.println("    getServerPort:         " + request.getServerPort());
        ps.println("    getRemoteAddr:         " + request.getRemoteAddr());
        ps.println("    getRemoteHost:         " + request.getRemoteHost());
        //ps.println("    getRealPath:           "+request.getRealPath());


        ps.println(".............................");
        ps.println("");
        i = 0;
        e = request.getAttributeNames();
        ps.println("    Attribute Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Attribute[" + i + "]: " + s);
            ps.println(" Type: " + request.getAttribute(s));
        }

        ps.println(".............................");
        ps.println("");
        i = 0;
        e = request.getParameterNames();
        ps.println("    Parameter Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Parameter[" + i + "]: " + s);
            ps.println(" Value: " + request.getParameter(s));
        }

        ps.println("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
        ps.println(" . . . . . . . . . Servlet Infomation API  . . . . . . . . . . . . . .");
        ps.println("");

        ps.println("Servlet Context:");
        ps.println("");

        i = 0;
        e = servletContext.getAttributeNames();
        ps.println("    Attribute Names:");
        while(e.hasMoreElements()) {
            i++;
            String s = (String) e.nextElement();
            ps.print("        Attribute[" + i + "]: " + s);
            ps.println(" Type: " + servletContext.getAttribute(s));
        }

        ps.println("    ServletContext.getRealPath(\".\"): " + servletContext.getRealPath("."));
        ps.println("    ServletContext.getMajorVersion(): " + servletContext.getMajorVersion());
//        ps.println("ServletContext.getMimeType():     " + sc.getMimeType());
        ps.println("    ServletContext.getMinorVersion(): " + servletContext.getMinorVersion());
//        ps.println("ServletContext.getRealPath(): " + sc.getRealPath());


        ps.println(".............................");
        ps.println("Servlet Config:");
        ps.println("");

        ServletConfig scnfg = getServletConfig();

        i = 0;
        e = scnfg.getInitParameterNames();
        ps.println("    InitParameters:");
        while(e.hasMoreElements()) {
            String p = (String) e.nextElement();
            ps.print("        InitParameter[" + i + "]: " + p);
            ps.println(" Value: " + scnfg.getInitParameter(p));
            i++;
        }
        ps.println("");
        ps.println("######################## END PROBE ###############################");
        ps.println("");

    }
public void probeRequest ( PrintStream ps , ReqState rs ) { Enumeration e ; int i ; HttpServletRequest request = rs . getRequest ( ) ; ps . println ( "####################### PROBE ##################################" ) ; ps . println ( "The HttpServletRequest object is actually a: " + request . getClass ( ) . getName ( ) ) ; ps . println ( "" ) ; ps . println ( "HttpServletRequest Interface:" ) ; ps . println ( "    getAuthType:           " + request . getAuthType ( ) ) ; ps . println ( "    getMethod:             " + request . getMethod ( ) ) ; ps . println ( "    getPathInfo:           " + request . getPathInfo ( ) ) ; ps . println ( "    getPathTranslated:     " + request . getPathTranslated ( ) ) ; ps . println ( "    getRequestURL:         " + request . getRequestURL ( ) ) ; ps . println ( "    getQueryString:        " + request . getQueryString ( ) ) ; ps . println ( "    getRemoteUser:         " + request . getRemoteUser ( ) ) ; ps . println ( "    getRequestedSessionId: " + request . getRequestedSessionId ( ) ) ; ps . println ( "    getRequestURI:         " + request . getRequestURI ( ) ) ; ps . println ( "    getServletPath:        " + request . getServletPath ( ) ) ; ps . println ( "    isRequestedSessionIdFromCookie: " + request . isRequestedSessionIdFromCookie ( ) ) ; ps . println ( "    isRequestedSessionIdValid:      " + request . isRequestedSessionIdValid ( ) ) ; ps . println ( "    isRequestedSessionIdFromURL:    " + request . isRequestedSessionIdFromURL ( ) ) ; ps . println ( "" ) ; i = 0 ; e = request . getHeaderNames ( ) ; ps . println ( "    Header Names:" ) ; while ( e . hasMoreElements ( ) ) { i ++ ; String s = ( String ) e . nextElement ( ) ; ps . print ( "        Header[" + i + "]: " + s ) ; ps . println ( ": " + request . getHeader ( s ) ) ; } ps . println ( "" ) ; ps . println ( "ServletRequest Interface:" ) ; ps . println ( "    getCharacterEncoding:  " + request . getCharacterEncoding ( ) ) ; ps . println ( "    getContentType:        " + request . getContentType ( ) ) ; ps . println ( "    getContentLength:      " + request . getContentLength ( ) ) ; ps . println ( "    getProtocol:           " + request . getProtocol ( ) ) ; ps . println ( "    getScheme:             " + request . getScheme ( ) ) ; ps . println ( "    getServerName:         " + request . getServerName ( ) ) ; ps . println ( "    getServerPort:         " + request . getServerPort ( ) ) ; ps . println ( "    getRemoteAddr:         " + request . getRemoteAddr ( ) ) ; ps . println ( "    getRemoteHost:         " + request . getRemoteHost ( ) ) ; //ps.println("    getRealPath:           "+request.getRealPath()); ps . println ( "............................." ) ; ps . println ( "" ) ; i = 0 ; e = request . getAttributeNames ( ) ; ps . println ( "    Attribute Names:" ) ; while ( e . hasMoreElements ( ) ) { i ++ ; String s = ( String ) e . nextElement ( ) ; ps . print ( "        Attribute[" + i + "]: " + s ) ; ps . println ( " Type: " + request . getAttribute ( s ) ) ; } ps . println ( "............................." ) ; ps . println ( "" ) ; i = 0 ; e = request . getParameterNames ( ) ; ps . println ( "    Parameter Names:" ) ; while ( e . hasMoreElements ( ) ) { i ++ ; String s = ( String ) e . nextElement ( ) ; ps . print ( "        Parameter[" + i + "]: " + s ) ; ps . println ( " Value: " + request . getParameter ( s ) ) ; } ps . println ( "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" ) ; ps . println ( " . . . . . . . . . Servlet Infomation API  . . . . . . . . . . . . . ." ) ; ps . println ( "" ) ; ps . println ( "Servlet Context:" ) ; ps . println ( "" ) ; i = 0 ; e = servletContext . getAttributeNames ( ) ; ps . println ( "    Attribute Names:" ) ; while ( e . hasMoreElements ( ) ) { i ++ ; String s = ( String ) e . nextElement ( ) ; ps . print ( "        Attribute[" + i + "]: " + s ) ; ps . println ( " Type: " + servletContext . getAttribute ( s ) ) ; } ps . println ( "    ServletContext.getRealPath(\".\"): " + servletContext . getRealPath ( "." ) ) ; ps . println ( "    ServletContext.getMajorVersion(): " + servletContext . getMajorVersion ( ) ) ; //        ps.println("ServletContext.getMimeType():     " + sc.getMimeType()); ps . println ( "    ServletContext.getMinorVersion(): " + servletContext . getMinorVersion ( ) ) ; //        ps.println("ServletContext.getRealPath(): " + sc.getRealPath()); ps . println ( "............................." ) ; ps . println ( "Servlet Config:" ) ; ps . println ( "" ) ; ServletConfig scnfg = getServletConfig ( ) ; i = 0 ; e = scnfg . getInitParameterNames ( ) ; ps . println ( "    InitParameters:" ) ; while ( e . hasMoreElements ( ) ) { String p = ( String ) e . nextElement ( ) ; ps . print ( "        InitParameter[" + i + "]: " + p ) ; ps . println ( " Value: " + scnfg . getInitParameter ( p ) ) ; i ++ ; } ps . println ( "" ) ; ps . println ( "######################## END PROBE ###############################" ) ; ps . println ( "" ) ; }
This is a bit of instrumentation that I kept around to let me look at the
state of the incoming <code>HttpServletRequest</code> from the client.
This method calls the <code>get*</code> methods of the request and prints
the results to standard out.

@param ps The <code>PrintStream</code> to send output.
@param rs The <code>ReqState</code> object to probe.
This is a bit of instrumentation that I kept around to let me look at the state of the incoming <code > HttpServletRequest< / code > from the client . This method calls the <code > get * < / code > methods of the request and prints the results to standard out .