opendap/src/main/java/opendap/servlet/ReqState.java
protected void processDodsURL() {

    String cxtpath = HTTPUtil.canonicalpath(myHttpRequest.getContextPath());
    if (cxtpath != null && cxtpath.length() == 0) cxtpath = null;
    if (cxtpath == null) cxtpath = "/"; // we are running as webapps/ROOT

    String servletpath = HTTPUtil.canonicalpath(myHttpRequest.getServletPath());
    if (servletpath != null && servletpath.length() == 0) servletpath = null;

    this.dataSetName = HTTPUtil.canonicalpath(myHttpRequest.getPathInfo());
    if (this.dataSetName != null && this.dataSetName.length() == 0) this.dataSetName = null;

    if (this.dataSetName == null) {
      if (servletpath != null) {
        // use servlet path
        if (cxtpath != null && servletpath.startsWith(cxtpath)) {
          this.dataSetName = servletpath.substring(cxtpath.length());
        } else {
          this.dataSetName = servletpath;
        }
      }
    } else {
      if (dataSetName.startsWith("/dodsC")) dataSetName = dataSetName.substring(6);
    }

    this.requestSuffix = null;
    if (this.dataSetName != null) {
      String name = this.dataSetName;
      if (name.startsWith("/")) name = name.substring(1); // remove any leading '/'
      String[] pieces = name.split("/");
      if (pieces.length == 0 || pieces[0].length() == 0) {
        requestSuffix = "";
        this.dataSetName = name;

      } else {
        String endOPath = pieces[pieces.length - 1];
        // Check the last element in the path for the character "."
        int index = endOPath.lastIndexOf('.');
        // If a dot is found take the stuff after it as the DAP2 request suffix
        if (index > 0) {
          // pluck the DAP2 request suffix off of the end
          requestSuffix = endOPath.substring(index + 1);

          // Set the data set name to the entire path minus the
          // suffix which we know exists in the last element
          // of the path.
          this.dataSetName = this.dataSetName.substring(1, this.dataSetName.lastIndexOf('.'));
        } else {    // strip the leading slash (/) from the dataset name and set the suffix to an empty string
          requestSuffix = "";
          this.dataSetName = name;
        }
      }
    }
  }
protected void processDodsURL() {

    String cxtpath = HTTPUtil.canonicalpath(myHttpRequest.getContextPath());
    if (cxtpath != null && cxtpath.length() == 0) cxtpath = null;
    if (cxtpath == null) cxtpath = "/"; // we are running as webapps/ROOT

    String servletpath = HTTPUtil.canonicalpath(myHttpRequest.getServletPath());
    if (servletpath != null && servletpath.length() == 0) servletpath = null;

    this.dataSetName = HTTPUtil.canonicalpath(myHttpRequest.getPathInfo());
    if (this.dataSetName != null && this.dataSetName.length() == 0) this.dataSetName = null;

    if (this.dataSetName == null) {
      if (servletpath != null) {
        // use servlet path
        if (cxtpath != null && servletpath.startsWith(cxtpath)) {
          this.dataSetName = servletpath.substring(cxtpath.length());
        } else {
          this.dataSetName = servletpath;
        }
      }
    } else {
      if (dataSetName.startsWith("/dodsC")) dataSetName = dataSetName.substring(6);
    }

    this.requestSuffix = null;
    if (this.dataSetName != null) {
      String name = this.dataSetName;
      if (name.startsWith("/")) name = name.substring(1); // remove any leading '/'
      String[] pieces = name.split("/");
      if (pieces.length == 0 || pieces[0].length() == 0) {
        requestSuffix = "";
        this.dataSetName = name;

      } else {
        String endOPath = pieces[pieces.length - 1];
        // Check the last element in the path for the character "."
        int index = endOPath.lastIndexOf('.');
        // If a dot is found take the stuff after it as the DAP2 request suffix
        if (index > 0) {
          // pluck the DAP2 request suffix off of the end
          requestSuffix = endOPath.substring(index + 1);

          // Set the data set name to the entire path minus the
          // suffix which we know exists in the last element
          // of the path.
          this.dataSetName = this.dataSetName.substring(1, this.dataSetName.lastIndexOf('.'));
        } else {    // strip the leading slash (/) from the dataset name and set the suffix to an empty string
          requestSuffix = "";
          this.dataSetName = name;
        }
      }
    }
  }
*************************************************************************
Processes an incoming <code>HttpServletRequest</code>. Uses the content of
the <code>HttpServletRequest</code>to create a <code>ReqState</code>
object in that caches the values for:
<ul>
<li> <b>dataSet</b> The data set name.(Accessible using
<code> setDataSet() </code>
and <code>getDataSet()</code>)</li>
<li> <b>CE</b> The constraint expression.(Accessible using
<code> setCE() </code>
and <code>getCE()</code>)</li>
<li> <b>requestSuffix</b> The request suffix, used by OPeNDAP DAP2 to
indicate the type of response desired by the client.
(Accessible using
<code> setRequestSuffix() </code>
and <code>getRequestSuffix()</code>)</li>
<li> <b>isClientCompressed</b> Does the requesting client
accept a compressed response?</li>
<li> <b>ServletConfig</b> The <code>ServletConfig</code> object
for this servlet.</li>
<li> <b>ServerName</b> The class name of this server.</li>
<li> <b>RequestURL</b> THe URL that that was used to call thye servlet.</li>
</ul>

@see ReqState