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

📄 userlistaction.java

📁 雷霆论坛是用J2EE技术开发的功能强大、扩展性强、易于定制
💻 JAVA
字号:
package lightningboard.action;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import lightningboard.Action;import lightningboard.Configuration;import lightningboard.util.StringUtil;import lightningboard.ActionException;import lightningboard.ActionMessage;import lightningboard.dao.DAOFactory;import lightningboard.dao.UserListDAO;import lightningboard.bean.UserListBean;import lightningboard.bean.User;public class UserListAction  implements Action  {  public String excute(HttpServletRequest request, HttpServletResponse response)      throws IOException, ServletException,ActionException {      int start=StringUtil.parseInt(request.getParameter("start"));      String keyword = request.getParameter("keyword");      keyword=StringUtil.notNull(keyword);      keyword=keyword.trim();      keyword=StringUtil.escapeSQLTags(keyword);      Configuration cfg=Configuration.getInstance();      int range = StringUtil.parseInt(cfg.getValue("SYS.RECORDS_PER_PAGE"));      if (start==0)        start=1;      DAOFactory daof=DAOFactory.getDAOFactory();      UserListDAO userListDAO=daof.getUserListDAO();      UserListBean userListBean=userListDAO.execute(start,range,keyword);      if (userListBean!=null){        request.setAttribute("userListBean",userListBean);        return "/userList.jsp";      }  else {        request.setAttribute("actionMessage",new ActionMessage("userList_error"));        return "/actionMessage.jsp";      }  }}

⌨️ 快捷键说明

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