// that the resource is readable. We cannot use resources
// returned by listBindings(), because that lists all of them,
// but does not perform the necessary checks on each.
Object obj = null;
try {
obj = libDir.lookup(ncPair.getName());
} catch (NamingException e) {
IOException ioe = new IOException(sm.getString(
"webappLoader.namingFailure", filename));
ioe.initCause(e);
throw ioe;