ArtManage.java
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.opensource.blog.web.action;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import org.apache.struts.action.ActionForm;
- import org.apache.struts.action.ActionForward;
- import org.apache.struts.action.ActionMapping;
- import com.laoer.comm.web.PageList;
- import com.laoer.comm.web.Pages;
- import com.opensource.blog.service.ArticleService;
- import com.opensource.blog.web.form.ArtManageForm;
- import com.opensource.blog.web.servlet.UserSession;
- public class ArtManage
- extends BaseAction {
- private ArticleService articleService;
- public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm,
- HttpServletRequest servletRequest,
- HttpServletResponse servletResponse) {
- ArtManageForm form = (ArtManageForm) actionForm;
- UserSession us = this.getUserSession(servletRequest);
- Pages pages = new Pages(servletRequest.getLocale());
- pages.setPage(form.getPage());
- pages.setPerPageNum(us.getBlog().getPerartnum());
- pages.setStyle(1);
- pages.setFileName("artManage.do");
- PageList pl = this.getArticleService().findArticlesByBlogID(us.getBlog().getId().longValue(),
- pages);
- servletRequest.setAttribute("pl", pl);
- return actionMapping.findForward("artmanage");
- }
- public ArticleService getArticleService() {
- return articleService;
- }
- public void setArticleService(ArticleService articleService) {
- this.articleService = articleService;
- }
- }