Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2759#discussion_r192902457
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
 ---
    @@ -516,30 +518,37 @@ private WebAppContext loadWar(final File warFile, 
final String contextPath, fina
     
         private ContextHandler createDocsWebApp(final String contextPath) {
             try {
    -            final ResourceHandler resourceHandler = new ResourceHandler();
    -            resourceHandler.setDirectoriesListed(false);
    -
                 final File docsDir = getDocsDir("docs");
                 final Resource docsResource = Resource.newResource(docsDir);
     
    -            // load the component documentation working directory
    +            // Load the component documentation working directory
                 final File componentDocsDirPath = 
props.getComponentDocumentationWorkingDirectory();
                 final File workingDocsDirectory = 
getWorkingDocsDirectory(componentDocsDirPath);
                 final Resource workingDocsResource = 
Resource.newResource(workingDocsDirectory);
     
                 final File webApiDocsDir = getWebApiDocsDir();
                 final Resource webApiDocsResource = 
Resource.newResource(webApiDocsDir);
     
    -            // create resources for both docs locations
    +            // Create resources for all docs locations
                 final ResourceCollection resources = new 
ResourceCollection(docsResource, workingDocsResource, webApiDocsResource);
    -            resourceHandler.setBaseResource(resources);
     
    -            // create the context handler
    -            final ContextHandler handler = new ContextHandler(contextPath);
    -            handler.setHandler(resourceHandler);
    +
    +            // The below ServletContext and Servlet API usage was derived 
from https://stackoverflow.com/a/34277268.
    +            // Thanks go to Stack Overflow user Joakim Erdfelt.
    --- End diff --
    
    I think referencing a resource is ok but personal callouts aren't unless 
the code is derived from something under license to them? @joewitt can you 
please advise?


---

Reply via email to