showAllArticleForPage

public String showAllArticleForPage() throws Exception{
	HttpServletRequest request = ServletActionContext.getRequest();
	String username=(String) ActionContext.getContext().getSession().get("user");

	System.out.println("showAllArticleForPage===发表文章和修改文章后跳转的页面 =username="+username);
	String pageIndexS = request.getParameter("pageIndex");
	Integer pageIndex = 1;
	Boolean pcOrmobile=HttpRequestDeviceUtils.isMobileDevice(request);
	System.out.println("pcOrmobile=="+HttpRequestDeviceUtils.isMobileDevice(request));
	if(pcOrmobile){
     return "mobile";
	}
	if(!"".equals(pageIndexS) && pageIndexS != null){
		pageIndex = Integer.parseInt(request.getParameter("pageIndex"));
		request.setAttribute("pageIndex", pageIndex);
	}

	//request.setAttribute("pager", articleService.showAllArticleForPageByUsername(username,pageIndex));
	//request.setAttribute("pager", articleService.showAllArticleForPage(pageIndex));
	request.setAttribute("type", "sign");
	return "articlesList";
}

时间: 2024-10-11 04:04:39

showAllArticleForPage的相关文章

Quick Tip: How to Add Syntax Highlighting to Any Project

Quick Tip: How to Add Syntax Highlighting to Any Projectpublic String showAllArticleForPage() throws Exception{HttpServletRequest request = ServletActionContext.getRequest();String username=(String) ActionContext.getContext().getSession().get("user&q