for (int i=0; i < contextName.length(); i++) buf.append(" ");
String offset = buf.toString();
NamingEnumeration enumer = context.list("");
while (enumer.hasMore()) {
try {
NameClassPair pair = (NameClassPair)enumer.next();
Object obj = context.lookup(pair.getName());
if (obj instanceof Context) scanContext(contextName + pair.getName() + "/", (Context)obj, out);
else {
out.println(offset + pair.getName() + " class='" + pair.getClassName() + "'");
// out.println(tmpOffset + " class='" + pair.getClassName() + "'");
}
}
catch (javax.naming.CommunicationException e) {
out.println("Ignoring problem: " + e.toString());