try {
Root root = (Root) request.getAttribute("root");
Tree tree = (Tree) request.getAttribute("tree");
Tree parent = tree.getParent();
if (parent != null) {
parent.removeChild(tree.getName());
root.commit(DefaultConflictHandler.OURS);
response.sendError(HttpServletResponse.SC_OK);
} else {
// Can't remove the root node
response.sendError(HttpServletResponse.SC_FORBIDDEN);