code: private static String getContentType(String fileExtension) {
          if (fileExtension == null) {
              return null;
          }
                  
          String contentType = null;
          
          fileExtension = fileExtension.toLowerCase();
  
          if ("html".equals(fileExtension)) {
              contentType = "text/html";
          }
          else if ("htm".equals(fileExtension)) {
              contentType = "text/html";
          }
          else if ("jar".equals(fileExtension)) {
              contentType = "application/java-archive";
          }
          else if ("js".equals(fileExtension)) {
              contentType = "text/javascript";
          }
          else if ("png".equals(fileExtension)) {
              contentType = "image/png";
          }
          else if ("gif".equals(fileExtension)) {
              contentType = "image/gif";
          }
          else if ("jpg".equals(fileExtension)) {
              contentType = "image/jpeg";
          }
          else if ("jpeg".equals(fileExtension)) {
              contentType = "image/jpeg";
          }
          else if ("css".equals(fileExtension)) {
              contentType = "text/css";
          }
          else if ("swf".equals(fileExtension)) {
              contentType = "application/x-shockwave-flash";
          }
          else if ("xap".equals(fileExtension)) {
              contentType = "application/x-silverlight-app";
          }
          else if ("htc".equals(fileExtension)) {
              contentType = "text/x-component";
          }
          else if ("jnlp".equals(fileExtension)) {
              contentType = "application/x-java-jnlp-file";
          }
          else if ("manifest".equals(fileExtension)) {
              contentType = "text/cache-manifest";
          }
          else if ("appcache".equals(fileExtension)) {
              contentType = "text/cache-manifest";
          }
          else if ("vtt".equals(fileExtension)) {
              contentType = "text/vtt";
          }
          else if ("aspx".equals(fileExtension)) {
              contentType = "text/html";
          }
          else if ("apk".equals(fileExtension)) {
              contentType = "application/vnd.android.package-archive";
          }
  
          return contentType;
      }
docs: TODO: is this still necessary now that we are above HttpSession?