// Check to see if we have the name we need to create a context
if (v.isEmpty())
throw new CommandException(new Exception(), "No name specified");
String name = (String)v.firstElement();
try {
c.createSubcontext(name);
System.out.println("Created " + name);
}
catch (NoPermissionException npe) {
throw new CommandException(npe,
"You don't have permission to create " + name + " at this context");
}
catch (NamingException ne) {
throw new CommandException(ne, "Couldn't create " + name);
}