⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comtshow.java

📁 前台:文章浏览、发表留言、Game、Music 后台:文章相关:发表文章、修改文章、删除文章、批量移动文章 栏目相关:增加栏目、修改栏目、删除栏目、栏目链接、栏目排序系统栏目分为系统内部栏目和外部栏目
💻 JAVA
字号:
package com.yhcms.comt.action;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.yhcms.comt.dao.ComtDaoIm;
import com.yhcms.comt.itface.ComtDao;
import com.yhcms.db.DBConnException;
import com.yhcms.utils.ReqUtils;

/**
 * <p>Title:系统显示文章评论Action</p>
 * <li>显示文章评论</li>
 * <li>从Request取得文章Id,然后取得文章评论</li>
 * <br><b>CopyRight: yyhweb[由由华网]</b>
 * @author stephen
 * @version YH-2.0
 */
public class ComtShow extends Action {
	public ActionForward execute(ActionMapping actionmapping,ActionForm form,
			 HttpServletRequest request,HttpServletResponse response){
		Logger yhlog = Logger.getLogger(ComtShow.class.getName());
		
		int artId = ReqUtils.getInt(request,"artId");
//		int artId = 5;
		ArrayList comtList = null;
		ComtDao comtdao = ComtDaoIm.getInstance();
		try {
			comtList = (ArrayList) comtdao.getAllByArtId(artId);
		}catch (DBConnException e) {
			yhlog.warn("When get one article comment show, throws Exception. the article id is:"+artId);
		}
		request.setAttribute("artId",artId);
		request.setAttribute("comtlist", comtList);
		return actionmapping.findForward("Show");
		}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -