opendap/src/main/java/opendap/servlet/GetInfoHandler.java
public void sendINFO(PrintWriter pw, GuardedDataset gds, ReqState rs) throws DAP2Exception, ParseException {

        if (_Debug) System.out.println("opendap.servlet.GetInfoHandler.sendINFO() reached.");

        String responseDoc = null;
        ServerDDS myDDS = null;
        DAS myDAS = null;


        myDDS = gds.getDDS();
        myDAS = gds.getDAS();


        infoDir = rs.getINFOCache(rs.getRootPath());


        responseDoc = loadOverrideDoc(infoDir, rs.getDataSet());

        if (responseDoc != null) {
            if (_Debug) System.out.println("override document: " + responseDoc);
            pw.print(responseDoc);
        } else {


            String user_html = get_user_supplied_docs(rs.getServerClassName(), rs.getDataSet());

            String global_attrs = buildGlobalAttributes(myDAS, myDDS);

            String variable_sum = buildVariableSummaries(myDAS, myDDS);

            // Send the document back to the client.
            pw.println("<html><head><title>Dataset Information</title>");
            pw.println("<style type=\"text/css\">");
            pw.println("<!-- ul {list-style-type: none;} -->");
            pw.println("</style>");
            pw.println("</head>");
            pw.println("<body>");

            if (global_attrs.length() > 0) {
                pw.println(global_attrs);
                pw.println("<hr>");
            }

            pw.println(variable_sum);

            pw.println("<hr>");

            pw.println(user_html);

            pw.println("</body></html>");

            // Flush the output buffer.
            pw.flush();
        }

    }
public void sendINFO(PrintWriter pw, GuardedDataset gds, ReqState rs) throws DAP2Exception, ParseException {

        if (_Debug) System.out.println("opendap.servlet.GetInfoHandler.sendINFO() reached.");

        String responseDoc = null;
        ServerDDS myDDS = null;
        DAS myDAS = null;


        myDDS = gds.getDDS();
        myDAS = gds.getDAS();


        infoDir = rs.getINFOCache(rs.getRootPath());


        responseDoc = loadOverrideDoc(infoDir, rs.getDataSet());

        if (responseDoc != null) {
            if (_Debug) System.out.println("override document: " + responseDoc);
            pw.print(responseDoc);
        } else {


            String user_html = get_user_supplied_docs(rs.getServerClassName(), rs.getDataSet());

            String global_attrs = buildGlobalAttributes(myDAS, myDDS);

            String variable_sum = buildVariableSummaries(myDAS, myDDS);

            // Send the document back to the client.
            pw.println("<html><head><title>Dataset Information</title>");
            pw.println("<style type=\"text/css\">");
            pw.println("<!-- ul {list-style-type: none;} -->");
            pw.println("</style>");
            pw.println("</head>");
            pw.println("<body>");

            if (global_attrs.length() > 0) {
                pw.println(global_attrs);
                pw.println("<hr>");
            }

            pw.println(variable_sum);

            pw.println("<hr>");

            pw.println(user_html);

            pw.println("</body></html>");

            // Flush the output buffer.
            pw.flush();
        }

    }
public void sendINFO ( PrintWriter pw , GuardedDataset gds , ReqState rs ) throws DAP2Exception , ParseException { if ( _Debug ) System . out . println ( "opendap.servlet.GetInfoHandler.sendINFO() reached." ) ; String responseDoc = null ; ServerDDS myDDS = null ; DAS myDAS = null ; myDDS = gds . getDDS ( ) ; myDAS = gds . getDAS ( ) ; infoDir = rs . getINFOCache ( rs . getRootPath ( ) ) ; responseDoc = loadOverrideDoc ( infoDir , rs . getDataSet ( ) ) ; if ( responseDoc != null ) { if ( _Debug ) System . out . println ( "override document: " + responseDoc ) ; pw . print ( responseDoc ) ; } else { String user_html = get_user_supplied_docs ( rs . getServerClassName ( ) , rs . getDataSet ( ) ) ; String global_attrs = buildGlobalAttributes ( myDAS , myDDS ) ; String variable_sum = buildVariableSummaries ( myDAS , myDDS ) ; // Send the document back to the client. pw . println ( "<html><head><title>Dataset Information</title>" ) ; pw . println ( "<style type=\"text/css\">" ) ; pw . println ( "<!-- ul {list-style-type: none;} -->" ) ; pw . println ( "</style>" ) ; pw . println ( "</head>" ) ; pw . println ( "<body>" ) ; if ( global_attrs . length ( ) > 0 ) { pw . println ( global_attrs ) ; pw . println ( "<hr>" ) ; } pw . println ( variable_sum ) ; pw . println ( "<hr>" ) ; pw . println ( user_html ) ; pw . println ( "</body></html>" ) ; // Flush the output buffer. pw . flush ( ) ; } }
************************************************************************
Default handler for OPeNDAP info requests. Returns an html document
describing the contents of the servers datasets.
<p/>
The "INFOcache" &lt;init-param&gt; element in the web.xml file
specifies the designated location for:
<ul>
<li>".info" response override files.</li>
<li>Server specific HTML* files.</li>
<li>Dataset specific HTML* files .</li>
</ul>
<p/>
The server specific HTML* files must be named #servlet#.html
where #servlet# is the name of the servlet that is running as
the OPeNDAP server in question. This name is determined at run time
by using the class called Class ( this.getClass().getName() ).
<p/>
<p>In the C++ code the analogy is the per-cgi file names.</p>
<p/>
<p/>
The dataset specific HTML* files are located by catenating `.html'
to #name#, where #name# is the name of the dataset. If the filename part
of #name# is of the form [A-Za-z]+[0-9]*.* then this function also looks
for a file whose name is [A-Za-z].html For example, if #name# is
.../data/fnoc1.nc this function first looks for .../data/fnoc1.nc.html.
However, if that does not exist it will look for .../data/fnoc.html. This
allows one `per-dataset' file to be used for a collection of files with
the same root name.
</p>
<p/>
NB: An HTML* file contains HTML without the <html>, <head> or <body> tags
(my own notation).
<p/>
<h3>Look for the user supplied Server- and dataset-specific HTML* documents.</h3>

@param pw  The PrintStream to which the output should be written.
@param gds The thread safe dataset.
@param rs  The ReqState object for theis client request.
@see GuardedDataset
@see ReqState
************************************************************************ Default handler for OPeNDAP info requests . Returns an html document describing the contents of the servers datasets . <p / > The INFOcache &lt ; init - param&gt ; element in the web . xml file specifies the designated location for : <ul > <li > . info response override files . < / li > <li > Server specific HTML * files . < / li > <li > Dataset specific HTML * files . < / li > < / ul > <p / > The server specific HTML * files must be named #servlet# . html where #servlet# is the name of the servlet that is running as the OPeNDAP server in question . This name is determined at run time by using the class called Class ( this . getClass () . getName () ) . <p / > <p > In the C ++ code the analogy is the per - cgi file names . < / p > <p / > <p / > The dataset specific HTML * files are located by catenating . html to #name# where #name# is the name of the dataset . If the filename part of #name# is of the form [ A - Za - z ] + [ 0 - 9 ] * . * then this function also looks for a file whose name is [ A - Za - z ] . html For example if #name# is ... / data / fnoc1 . nc this function first looks for ... / data / fnoc1 . nc . html . However if that does not exist it will look for ... / data / fnoc . html . This allows one per - dataset file to be used for a collection of files with the same root name . < / p > <p / > NB : An HTML * file contains HTML without the <html > <head > or <body > tags ( my own notation ) . <p / > <h3 > Look for the user supplied Server - and dataset - specific HTML * documents . < / h3 >