opendap/src/main/java/opendap/servlet/AbstractServlet.java
public void doDebug(ReqState rs) throws IOException {


    rs.getResponse().setHeader("XDODS-Server", getServerVersion());
    rs.getResponse().setContentType("text/html");
    rs.getResponse().setHeader("Content-Description", "dods_debug");

    PrintWriter pw = new PrintWriter(new OutputStreamWriter(rs.getResponse().getOutputStream(), Util.UTF8));
    pw.println("<title>Debugging</title>");
    pw.println("<body><pre>");

    StringTokenizer tz = new StringTokenizer(rs.getConstraintExpression(), "=;");
    while (tz.hasMoreTokens()) {
      String cmd = tz.nextToken();
      pw.println("Cmd= " + cmd);

      if (cmd.equals("help")) {
        pw.println(" help;log;logEnd;logShow");
        pw.println(" showFlags;showInitParameters;showRequest");
        pw.println(" on|off=(flagName)");
        doDebugCmd(cmd, tz, pw); // for subclasses
      } else if (cmd.equals("on"))
        Debug.set(tz.nextToken(), true);

      else if (cmd.equals("off"))
        Debug.set(tz.nextToken(), false);

      else if (cmd.equals("showFlags")) {
        Iterator iter = Debug.keySet().iterator();
        while (iter.hasNext()) {
          String key = (String) iter.next();
          pw.println("  " + key + " " + Debug.isSet(key));
        }
      } else if (cmd.equals("showInitParameters"))
        pw.println(rs.toString());

      else if (cmd.equals("showRequest"))
        probeRequest(pw, rs);

      else if (!doDebugCmd(cmd, tz, pw)) { // for subclasses
        pw.println("  unrecognized command");
      }
    }

    pw.println("--------------------------------------");
    pw.println("Logging is on");
    Iterator iter = Debug.keySet().iterator();
    while (iter.hasNext()) {
      String key = (String) iter.next();
      boolean val = Debug.isSet(key);
      if (val)
        pw.println("  " + key + " " + Debug.isSet(key));
    }

    pw.println("</pre></body>");
    pw.flush();
    rs.getResponse().setStatus(HttpServletResponse.SC_OK);

  }
public void doDebug(ReqState rs) throws IOException {


    rs.getResponse().setHeader("XDODS-Server", getServerVersion());
    rs.getResponse().setContentType("text/html");
    rs.getResponse().setHeader("Content-Description", "dods_debug");

    PrintWriter pw = new PrintWriter(new OutputStreamWriter(rs.getResponse().getOutputStream(), Util.UTF8));
    pw.println("<title>Debugging</title>");
    pw.println("<body><pre>");

    StringTokenizer tz = new StringTokenizer(rs.getConstraintExpression(), "=;");
    while (tz.hasMoreTokens()) {
      String cmd = tz.nextToken();
      pw.println("Cmd= " + cmd);

      if (cmd.equals("help")) {
        pw.println(" help;log;logEnd;logShow");
        pw.println(" showFlags;showInitParameters;showRequest");
        pw.println(" on|off=(flagName)");
        doDebugCmd(cmd, tz, pw); // for subclasses
      } else if (cmd.equals("on"))
        Debug.set(tz.nextToken(), true);

      else if (cmd.equals("off"))
        Debug.set(tz.nextToken(), false);

      else if (cmd.equals("showFlags")) {
        Iterator iter = Debug.keySet().iterator();
        while (iter.hasNext()) {
          String key = (String) iter.next();
          pw.println("  " + key + " " + Debug.isSet(key));
        }
      } else if (cmd.equals("showInitParameters"))
        pw.println(rs.toString());

      else if (cmd.equals("showRequest"))
        probeRequest(pw, rs);

      else if (!doDebugCmd(cmd, tz, pw)) { // for subclasses
        pw.println("  unrecognized command");
      }
    }

    pw.println("--------------------------------------");
    pw.println("Logging is on");
    Iterator iter = Debug.keySet().iterator();
    while (iter.hasNext()) {
      String key = (String) iter.next();
      boolean val = Debug.isSet(key);
      if (val)
        pw.println("  " + key + " " + Debug.isSet(key));
    }

    pw.println("</pre></body>");
    pw.flush();
    rs.getResponse().setStatus(HttpServletResponse.SC_OK);

  }
public void doDebug ( ReqState rs ) throws IOException { rs . getResponse ( ) . setHeader ( "XDODS-Server" , getServerVersion ( ) ) ; rs . getResponse ( ) . setContentType ( "text/html" ) ; rs . getResponse ( ) . setHeader ( "Content-Description" , "dods_debug" ) ; PrintWriter pw = new PrintWriter ( new OutputStreamWriter ( rs . getResponse ( ) . getOutputStream ( ) , Util . UTF8 ) ) ; pw . println ( "<title>Debugging</title>" ) ; pw . println ( "<body><pre>" ) ; StringTokenizer tz = new StringTokenizer ( rs . getConstraintExpression ( ) , "=;" ) ; while ( tz . hasMoreTokens ( ) ) { String cmd = tz . nextToken ( ) ; pw . println ( "Cmd= " + cmd ) ; if ( cmd . equals ( "help" ) ) { pw . println ( " help;log;logEnd;logShow" ) ; pw . println ( " showFlags;showInitParameters;showRequest" ) ; pw . println ( " on|off=(flagName)" ) ; doDebugCmd ( cmd , tz , pw ) ; // for subclasses } else if ( cmd . equals ( "on" ) ) Debug . set ( tz . nextToken ( ) , true ) ; else if ( cmd . equals ( "off" ) ) Debug . set ( tz . nextToken ( ) , false ) ; else if ( cmd . equals ( "showFlags" ) ) { Iterator iter = Debug . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String key = ( String ) iter . next ( ) ; pw . println ( "  " + key + " " + Debug . isSet ( key ) ) ; } } else if ( cmd . equals ( "showInitParameters" ) ) pw . println ( rs . toString ( ) ) ; else if ( cmd . equals ( "showRequest" ) ) probeRequest ( pw , rs ) ; else if ( ! doDebugCmd ( cmd , tz , pw ) ) { // for subclasses pw . println ( "  unrecognized command" ) ; } } pw . println ( "--------------------------------------" ) ; pw . println ( "Logging is on" ) ; Iterator iter = Debug . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String key = ( String ) iter . next ( ) ; boolean val = Debug . isSet ( key ) ; if ( val ) pw . println ( "  " + key + " " + Debug . isSet ( key ) ) ; } pw . println ( "</pre></body>" ) ; pw . flush ( ) ; rs . getResponse ( ) . setStatus ( HttpServletResponse . SC_OK ) ; }
************************************************************************
Default handler for debug requests;

@param rs The client's <code> ReqState </code>  object.
************************************************************************ Default handler for debug requests ;