@RequestMapping
String deletecomment(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String actId = request.getParameter("actId");
String comId = request.getParameter("comId");
Comment com = m_ActivityService.getComment(comId);
if (null == actId) {
request.setAttribute("errorMsg", "找不到id=" + actId + "的活动");
return "error";
}
if (null == com) {
request.setAttribute("errorMsg", "找不到id=" + comId + "的评论");
return "error";
}
com.delete();
com.flush();
response.sendRedirect("../activity/activity.jspx?actId="
+ URLEncoder.encode(actId, "utf-8"));
return null;
}