code: @Override
     public WebAppDescriptor getConfig()
     {
        FileResource<?> configFile = getConfigFile();
        WebAppDescriptor descriptor;
        if (configFile.exists())
        {
  
           DescriptorImporter<WebAppDescriptor> importer = Descriptors.importAs(WebAppDescriptor.class);
           InputStream inputStream = configFile.getResourceInputStream();
           try
           {
              descriptor = importer.fromStream(inputStream);
           }
           finally
           {
              Streams.closeQuietly(inputStream);
           }
        }
        else
        {
           descriptor = Descriptors.create(WebAppDescriptor.class);
           String projectName = getFaceted().getFacet(MetadataFacet.class).getProjectName();
           WebAppDescriptor unit = descriptor
                    .version("2.5")
                    .displayName(projectName)
                    .createSessionConfig()
                    .sessionTimeout(30).up();
           // FORGE-657
           unit.createMimeMapping().extension("ico").mimeType("image/x-icon");
           configFile.setContents(descriptor.exportAsString());
        }
        return descriptor;
     }
docs: /*
  Facet Methods