找传奇、传世资源到传世资源站!

jsp 企业日常事务管理系统源码(含数据库脚本)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

此实例lib下包含了jstl.jar standard.jar 可下载查看,本实例 实现了 登陆操作,文章发布以及评论功能,还有新闻编辑器
1. 在mysql 执行数据库脚本2. 在 DBConnection.java 修改 DBPASSWORD 为你本机密码3. 运行即可看到如下效果

from clipboard
from clipboard
from clipboard
package com.sanqing.servlet;import java.io.IOException;import java.util.List;import javax.servlet.RequestDispatcher;import javax.servlet.ServletContext;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import com.sanqing.bean.Message;import com.sanqing.dao.MessageDAO;import com.sanqing.factory.MessageDAOFactory;import com.sanqing.util.Page;import com.sanqing.util.PageUtil;public class GetMessageList extends HttpServlet {public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {int currentPage = 0;String currentPageStr = request.getParameter("currentPage");if(currentPageStr == null || "".equals(currentPageStr)){currentPage = 1;}else {currentPage = Integer.parseInt(currentPageStr);}MessageDAO messageDAO = MessageDAOFactory.getMessageAOInstance();Page page = PageUtil.createPage(5, messageDAO.findAllCount(), currentPage);List<Message> messages = messageDAO.findAllMessagee(page);request.setAttribute("messageList", messages);request.setAttribute("page", page);ServletContext servletContext = getServletContext();RequestDispatcher dispatcher = servletContext.getRequestDispatcher("/msgList.jsp");//跳转到消息列表页dispatcher.forward(request, response);}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {doGet(request, response);}}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复