typenewwatch.java
来自「jsp技术 基于struts框架的新闻发布系统」· Java 代码 · 共 29 行
JAVA
29 行
package com.victor.frontStage.newsAction;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.victor.domain.NewsTypeActionForm;
import com.victor.service.NewsTypeFacade;
import com.victor.service.NewsTypeFacadeImpl;
import java.util.List;
//通过此方法把所要类型新闻显示到top.jsp上
public class TypeNewWatch
extends Action {
private NewsTypeFacade newsTypeFacade;
public TypeNewWatch() {
this.newsTypeFacade = new NewsTypeFacadeImpl();
}
public ActionForward perform(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
/**@todo: complete the business logic here, this is just a skeleton.*/
NewsTypeActionForm newsTypeActionForm = (NewsTypeActionForm) actionForm;
List list = this.newsTypeFacade.newsWarch();
httpServletRequest.setAttribute("listType", list);
return actionMapping.findForward("typeNewWatch");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?