public String add() { Long blogId = BId; Comment comment = new Comment(); comment.setBlogId(blogId); comment.setContent(content); comment.setOwner(getUser()); CommentManager cm = WebBlogUtil.getCommentManager(); cm.add(comment); cm.close(); return SUCCESS; }
public String delete() { CommentManager cm = WebBlogUtil.getCommentManager(); cm.remove(CId); cm.close(); return SUCCESS; }