package com.huaao.news.action.service; import java.util.List; import org.apache.struts2.ServletActionContext; import com.huaao.news.bean.Comments; import com.huaao.news.service.ICommentsService; public class CommentsAction { private Comments comments; private ICommentsService commentsService; private List<Comments> list; public String select(){ list = commentsService.selectAll(); ServletActionContext.getRequest().getSession().setAttribute("commentsList", list); return "comments"; } public Comments getComments() { return comments; } public void setComments(Comments comments) { this.comments = comments; } public ICommentsService getCommentsService() { return commentsService; } public void setCommentsService(ICommentsService commentsService) { this.commentsService = commentsService; } }
最近下载更多