question: private void locateUriRoot ( File f ) { String tUriBase = uriBase ; if ( tUriBase == null ) { tUriBase = "/" ; } try { if ( f . exists ( ) ) { f = new File ( f . getCanonicalPath ( ) ) ; while ( f != null ) { File g = new File ( f , "WEB-INF" ) ; if ( g . exists ( ) && g . isDirectory ( ) ) { uriRoot = f . getCanonicalPath ( ) ; uriBase = tUriBase ; if ( log . isLoggable ( Level . INFO ) ) { log . info ( Localizer . getMessage ( "jspc.implicit.uriRoot" , uriRoot ) ) ; } break ; } if ( f . exists ( ) && f . isDirectory ( ) ) { tUriBase = "/" + f . getName ( ) + "/" + tUriBase ; } String fParent = f . getParent ( ) ; if ( fParent == null ) { break ; } else { f = new File ( fParent ) ; } } if ( uriRoot != null ) { File froot = new File ( uriRoot ) ; uriRoot = froot . getCanonicalPath ( ) ; } } } catch ( IOException ioe ) { } }
target:  Find the WEB-INF dir by looking up in the directory tree. This is used if no explicit docbase is set, but only files. XXX Maybe we should require the docbase.