command = request.url.substring(1);
}
final String commandString = getCommandString(command);
final OServerCommand cmd = (OServerCommand) cmdManager.getCommand(commandString);
Map<String, String> requestParams = cmdManager.extractUrlTokens(commandString);
if (requestParams != null) {
if (request.parameters == null) {
request.parameters = new HashMap<String, String>();
}
for (Map.Entry<String, String> entry : requestParams.entrySet()) {
request.parameters.put(entry.getKey(), URLDecoder.decode(entry.getValue(), "UTF-8"));
}
}
if (cmd != null)
try {
if (cmd.beforeExecute(request, response))
try {
// EXECUTE THE COMMAND
isChain = cmd.execute(request, response);
} finally {
cmd.afterExecute(request, response);
}
} catch (Exception e) {
handleError(e);
}