String pathInfo = req.getPathInfo();
if (pathInfo.startsWith("/")) {
pathInfo = pathInfo.substring(1);
}
CommandDescriptor commandDescriptor = this.commands.get(pathInfo);
if (!commandDescriptor.isPut()) {
throw new AssertionError(new String("commandDescriptor is not Put in doPut"));
}
user = checkLogin(req, resp, commandDescriptor);
if (user == null && !commandDescriptor.isNoLogin()) {
return;
}
Command command = commandDescriptor.getCommand();
command.init();
command.handleCommand(req, resp, user);
} catch (RuntimeException re) {
log(req, "doPut", re, user);