System.out.println("    XDODS-Server: " + rs.getXDODSServer()); System.out.println("    XOPeNDAP-Server: " + rs.getXOPeNDAPServer()); System.out.println("    XDAP: " + rs.getXDAP(request));
System.out.println("    XDODS-Server: " + getXDODSServerVersion()); System.out.println("    XOPeNDAP-Server: " + getXOPeNDAPServerVersion()); System.out.println("    XDAP: " + getXDAPVersion(request));
    public void sendVersion(HttpServletRequest request,                            HttpServletResponse response,                            ReqState rs)            throws IOException, ServletException, DODSException {        if (Debug.isSet("showResponse"))            System.out.println("Sending Version Document:");        response.setContentType("text/xml");        response.setHeader("XDODS-Server", getXDODSServerVersion());        response.setHeader("XOPeNDAP-Server", getXOPeNDAPServerVersion());        response.setHeader("XDAP", getXDAPVersion(request));        response.setHeader("Content-Description", "dods_version");        // Commented because of a bug in the OPeNDAP C++ stuff...        //response.setHeader("Content-Encoding", "plain");        PrintStream ps = new PrintStream(response.getOutputStream());        Document vdoc = rs.getVersionDocument();        if (vdoc == null) {            throw new DODSException("Internal Error: Version Document not initialized.");        }        XMLOutputter xout = new XMLOutputter(Format.getPrettyFormat());        //XMLOutputter xout = new XMLOutputter();        xout.output(rs.getVersionDocument(), ps);        ps.flush();        if (Debug.isSet("showResponse")) {            xout.output(rs.getVersionDocument(), System.out);            System.out.println("Document Sent.");            System.out.println("\nMIME Headers:");            System.out.println("    XDODS-Server: " + rs.getXDODSServer());            System.out.println("    XOPeNDAP-Server: " + rs.getXOPeNDAPServer());            System.out.println("    XDAP: " + rs.getXDAP(request));            System.out.println("\nEnd Response.");        }        response.setStatus(HttpServletResponse.SC_OK);    }