@ Override public boolean setProperties ( Dictionary < String , String > properties ) { this . properties = properties ; if ( this . properties != null ) { if ( properties . get ( "debug" ) != null ) debug = Integer . parseInt ( properties . get ( "debug" ) ) ; if ( properties . get ( "input" ) != null ) input = Integer . parseInt ( properties . get ( "input" ) ) ; if ( properties . get ( "output" ) != null ) output = Integer . parseInt ( properties . get ( "output" ) ) ; listings = Boolean . parseBoolean ( properties . get ( "listings" ) ) ; if ( properties . get ( "readonly" ) != null ) readOnly = Boolean . parseBoolean ( properties . get ( "readonly" ) ) ; if ( properties . get ( "sendfileSize" ) != null ) sendfileSize = Integer . parseInt ( properties . get ( "sendfileSize" ) ) * 1024 ; fileEncoding = properties . get ( "fileEncoding" ) ; globalXsltFile = properties . get ( "globalXsltFile" ) ; contextXsltFile = properties . get ( "contextXsltFile" ) ; localXsltFile = properties . get ( "localXsltFile" ) ; readmeFile = properties . get ( "readmeFile" ) ; if ( properties . get ( "useAcceptRanges" ) != null ) useAcceptRanges = Boolean . parseBoolean ( properties . get ( "useAcceptRanges" ) ) ; // Sanity check on the specified buffer sizes if ( input < 256 ) input = 256 ; if ( output < 256 ) output = 256 ; if ( debug > 0 ) { log ( "DefaultServlet.init: input buffer size=" + input + ", output buffer size=" + output ) ; } return this . setDocBase ( this . properties . get ( BASE_PATH ) ) ; } else { return this . setDocBase ( null ) ; } }
Set servlet the properties .