protected FrontPage getFrontPage ( DapRequest drq , DapContext cxt ) throws DapException { if ( this . defaultroots == null ) { // Figure out the directory containing // the files to display. String pageroot ; pageroot = getResourcePath ( drq , "" ) ; if ( pageroot == null ) throw new DapException ( "Cannot locate resources directory" ) ; this . defaultroots = new ArrayList <> ( ) ; this . defaultroots . add ( new Root ( "testfiles" , pageroot ) ) ; } return new FrontPage ( this . defaultroots , drq ) ; }
Isolate front page builder so we can override if desired for testing .