首页>代码>基于jsp+servlet的idea版学生管理系统,前端框架layui>/studentManage/源码/studentManage/src/main/java/controller/StudentAllInfoServlet.java
package controller; import domain.Student; import domain.StudentAllInfo; import service.StudentAllInfoService; import service.impl.StudentAllInfoServiceImpl; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; @WebServlet(name = "studentAllInfoServlet",urlPatterns = {"/studentAllInfo"}) public class StudentAllInfoServlet extends BaseServlet{ private StudentAllInfoService studentAllInfoService=new StudentAllInfoServiceImpl(); public void studentAllInfo(HttpServletRequest request, HttpServletResponse response) throws Exception{ List<StudentAllInfo> studentAllInfoList = studentAllInfoService.studentAllInfo(); System.out.println(studentAllInfoList); if (studentAllInfoList != null) { request.setAttribute("studentAllInfoList", studentAllInfoList); } else { request.setAttribute("msg", "无数据"); } request.getRequestDispatcher("/pages/studentAllInfo/studentAllInfo.jsp").forward(request, response); } public void findStudentAllInfoById(HttpServletRequest request, HttpServletResponse response) throws Exception { String id=request.getParameter("id"); StudentAllInfo studentAllInfo = studentAllInfoService.findStudentAllInfoById(id); if (studentAllInfo!=null) { request.setAttribute("student",studentAllInfo); } else { request.setAttribute("stuMsgError","查询失败,可能无id"); } request.getRequestDispatcher("/pages/studentAllInfo/singleStudentInfo.jsp").forward(request, response); } }
最近下载更多
微信网友_6914427966033920 LV4
3月20日
zhangjilu LV18
1月1日
gfznnbsafz LV1
2023年12月15日
7nfxfn6 LV1
2023年12月9日
jiemomo LV12
2023年11月2日
刘洋66666 LV1
2023年10月3日
麻辣香锅加锐澳 LV6
2023年7月29日
hongdongdong LV12
2023年6月27日
磊少不在 LV2
2023年6月18日
qweqweqwesfasfassada LV4
2023年6月14日
最近浏览更多
www12386456
前天
暂无贡献等级
1303891 LV1
4月14日
刘刘涛 LV1
3月25日
微信网友_6914427966033920 LV4
3月19日
wuqijun
3月6日
暂无贡献等级
翟子浩
1月22日
暂无贡献等级
15504791430
1月4日
暂无贡献等级
东淇 劳
1月2日
暂无贡献等级
zhangjilu LV18
1月1日
2289874612
2023年12月30日
暂无贡献等级