question: public static Context createContext ( final Context c , final String path ) throws NamingException { Context crtContext = c ; for ( StringTokenizer st = new StringTokenizer ( path , "/" ) ; st . hasMoreTokens ( ) ; ) { String tok = st . nextToken ( ) ; try { Object o = crtContext . lookup ( tok ) ; if ( ! ( o instanceof Context ) ) { throw new NamingException ( "Path " + path + " overwrites and already bound object" ) ; } crtContext = ( Context ) o ; continue ; } catch ( NameNotFoundException e ) { } crtContext = crtContext . createSubcontext ( tok ) ; } return crtContext ; }
target:  Create a context path recursively.