首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

Java Web的简单登录应用

后端 7.8MB 20 需要积分: 1
立即下载

资源介绍:

使用JavaWeb简单实现登录页面并分类跳转,使普通用户可以查看自己的有关数据,管理员身份登录可以对数据进行管理。(存在问题,求大佬指导)
package com.xxxx.controller; import com.xxxx.entity.LotteryRecord; import com.xxxx.service.LotteryRecordService; import com.xxxx.mapper.LotteryMapperImpl; import com.xxxx.mapper.LotteryRecordMapper; import com.xxxx.util.MyBatisUtil; import org.apache.ibatis.session.SqlSessionFactory; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; @WebServlet("/center") public class LotteryRecordServlet extends HttpServlet { public static int userId; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 获取 SqlSessionFactory 实例 SqlSessionFactory sqlSessionFactory = MyBatisUtil.getSqlSessionFactory(); int userId = Integer.parseInt(req.getParameter("userId")); // 创建 LotteryRecordMapperImpl 实例 LotteryRecordMapper mapper = new LotteryMapperImpl(sqlSessionFactory); // 创建 LotteryRecordService 实例 LotteryRecordService service = new LotteryRecordService(mapper); // 获取中奖记录 List records = service.getLotteryRecordsByUserId(userId); // 将记录添加到请求属性 req.setAttribute("lotteryRecords", records); // 转发到 JSP 页面 RequestDispatcher dispatcher = req.getRequestDispatcher("/center.jsp"); dispatcher.forward(req, resp); } }

资源文件列表:

loginProject.zip 大约有131个文件
  1. loginProject/
  2. loginProject/.idea/
  3. loginProject/.idea/.gitignore 184B
  4. loginProject/.idea/artifacts/
  5. loginProject/.idea/artifacts/loginProject_war_exploded.xml 523B
  6. loginProject/.idea/misc.xml 282B
  7. loginProject/.idea/modules.xml 271B
  8. loginProject/.idea/uiDesigner.xml 8.71KB
  9. loginProject/.idea/workspace.xml 20.03KB
  10. loginProject/loginProject.iml 1.89KB
  11. loginProject/out/
  12. loginProject/out/artifacts/
  13. loginProject/out/artifacts/loginProject_war_exploded/
  14. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/
  15. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/
  16. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/META-INF/
  17. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/META-INF/loginProject.kotlin_module 16B
  18. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/
  19. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/
  20. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/controller/
  21. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/controller/LotteryRecordServlet.class 2.15KB
  22. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/controller/UserServlet.class 2.21KB
  23. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/entity/
  24. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/entity/LotteryRecord.class 1.67KB
  25. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/entity/User.class 1.77KB
  26. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/entity/vo/
  27. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/entity/vo/MessageModel.class 1.14KB
  28. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/
  29. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/LotteryMapperImpl.class 1.58KB
  30. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/LotteryRecord.class 873B
  31. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/LotteryRecordMapper.class 271B
  32. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/LotteryRecordMapper.xml 731B
  33. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/UserMapper.class 188B
  34. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/mapper/UserMapper.xml 389B
  35. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/service/
  36. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/service/LotteryRecordService.class 771B
  37. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/service/UserService.class 1.93KB
  38. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/service/UserService2.class 587B
  39. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/test/
  40. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/test/Test.class 1.02KB
  41. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/util/
  42. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/util/GetSqlSession.class 1.51KB
  43. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/util/MyBatisUtil.class 1.01KB
  44. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/com/xxxx/util/StringUtil.class 565B
  45. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/mybatis-config.xml 885B
  46. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/classes/mysql.properties 160B
  47. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/lib/
  48. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/lib/mybatis-3.5.6.jar 1.66MB
  49. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/lib/mysql-connector-j-8.4.0.jar 2.42MB
  50. loginProject/out/artifacts/loginProject_war_exploded/WEB-INF/web.xml 304B
  51. loginProject/out/artifacts/loginProject_war_exploded/center.jsp 811B
  52. loginProject/out/artifacts/loginProject_war_exploded/index.jsp 327B
  53. loginProject/out/artifacts/loginProject_war_exploded/js/
  54. loginProject/out/artifacts/loginProject_war_exploded/js/jquery-3.7.1.js 289.09KB
  55. loginProject/out/artifacts/loginProject_war_exploded/login.jsp 1.45KB
  56. loginProject/out/artifacts/loginProject_war_exploded/maintanance.jsp 2.53KB
  57. loginProject/out/production/
  58. loginProject/out/production/loginProject/
  59. loginProject/out/production/loginProject/META-INF/
  60. loginProject/out/production/loginProject/META-INF/loginProject.kotlin_module 16B
  61. loginProject/out/production/loginProject/com/
  62. loginProject/out/production/loginProject/com/xxxx/
  63. loginProject/out/production/loginProject/com/xxxx/controller/
  64. loginProject/out/production/loginProject/com/xxxx/controller/LotteryRecordServlet.class 2.15KB
  65. loginProject/out/production/loginProject/com/xxxx/controller/UserServlet.class 2.21KB
  66. loginProject/out/production/loginProject/com/xxxx/entity/
  67. loginProject/out/production/loginProject/com/xxxx/entity/LotteryRecord.class 1.67KB
  68. loginProject/out/production/loginProject/com/xxxx/entity/User.class 1.77KB
  69. loginProject/out/production/loginProject/com/xxxx/entity/vo/
  70. loginProject/out/production/loginProject/com/xxxx/entity/vo/MessageModel.class 1.14KB
  71. loginProject/out/production/loginProject/com/xxxx/mapper/
  72. loginProject/out/production/loginProject/com/xxxx/mapper/LotteryMapperImpl.class 1.58KB
  73. loginProject/out/production/loginProject/com/xxxx/mapper/LotteryRecord.class 873B
  74. loginProject/out/production/loginProject/com/xxxx/mapper/LotteryRecordMapper.class 271B
  75. loginProject/out/production/loginProject/com/xxxx/mapper/LotteryRecordMapper.xml 731B
  76. loginProject/out/production/loginProject/com/xxxx/mapper/UserMapper.class 188B
  77. loginProject/out/production/loginProject/com/xxxx/mapper/UserMapper.xml 389B
  78. loginProject/out/production/loginProject/com/xxxx/service/
  79. loginProject/out/production/loginProject/com/xxxx/service/LotteryRecordService.class 771B
  80. loginProject/out/production/loginProject/com/xxxx/service/UserService.class 1.93KB
  81. loginProject/out/production/loginProject/com/xxxx/service/UserService2.class 587B
  82. loginProject/out/production/loginProject/com/xxxx/test/
  83. loginProject/out/production/loginProject/com/xxxx/test/Test.class 1.02KB
  84. loginProject/out/production/loginProject/com/xxxx/util/
  85. loginProject/out/production/loginProject/com/xxxx/util/GetSqlSession.class 1.51KB
  86. loginProject/out/production/loginProject/com/xxxx/util/MyBatisUtil.class 1.01KB
  87. loginProject/out/production/loginProject/com/xxxx/util/StringUtil.class 565B
  88. loginProject/out/production/loginProject/mybatis-config.xml 885B
  89. loginProject/out/production/loginProject/mysql.properties 160B
  90. loginProject/src/
  91. loginProject/src/com/
  92. loginProject/src/com/xxxx/
  93. loginProject/src/com/xxxx/controller/
  94. loginProject/src/com/xxxx/controller/LotteryRecordServlet.java 1.79KB
  95. loginProject/src/com/xxxx/controller/UserServlet.java 1.32KB
  96. loginProject/src/com/xxxx/entity/
  97. loginProject/src/com/xxxx/entity/LotteryRecord.java 1.16KB
  98. loginProject/src/com/xxxx/entity/User.java 1.26KB
  99. loginProject/src/com/xxxx/entity/vo/
  100. loginProject/src/com/xxxx/entity/vo/MessageModel.java 612B
  101. loginProject/src/com/xxxx/mapper/
  102. loginProject/src/com/xxxx/mapper/LotteryMapperImpl.java 780B
  103. loginProject/src/com/xxxx/mapper/LotteryRecord.java 432B
  104. loginProject/src/com/xxxx/mapper/LotteryRecordMapper.java 203B
  105. loginProject/src/com/xxxx/mapper/LotteryRecordMapper.xml 731B
  106. loginProject/src/com/xxxx/mapper/UserMapper.java 145B
  107. loginProject/src/com/xxxx/mapper/UserMapper.xml 389B
  108. loginProject/src/com/xxxx/service/
  109. loginProject/src/com/xxxx/service/LotteryRecordService.java 502B
  110. loginProject/src/com/xxxx/service/UserService.java 1.57KB
  111. loginProject/src/com/xxxx/service/UserService2.java 276B
  112. loginProject/src/com/xxxx/test/
  113. loginProject/src/com/xxxx/test/Test.java 488B
  114. loginProject/src/com/xxxx/util/
  115. loginProject/src/com/xxxx/util/GetSqlSession.java 1011B
  116. loginProject/src/com/xxxx/util/MyBatisUtil.java 768B
  117. loginProject/src/com/xxxx/util/StringUtil.java 213B
  118. loginProject/src/mybatis-config.xml 885B
  119. loginProject/src/mysql.properties 160B
  120. loginProject/web/
  121. loginProject/web/WEB-INF/
  122. loginProject/web/WEB-INF/lib/
  123. loginProject/web/WEB-INF/lib/mybatis-3.5.6.jar 1.66MB
  124. loginProject/web/WEB-INF/lib/mysql-connector-j-8.4.0.jar 2.42MB
  125. loginProject/web/WEB-INF/web.xml 304B
  126. loginProject/web/center.jsp 811B
  127. loginProject/web/index.jsp 327B
  128. loginProject/web/js/
  129. loginProject/web/js/jquery-3.7.1.js 289.09KB
  130. loginProject/web/login.jsp 1.45KB
  131. loginProject/web/maintanance.jsp 2.53KB
0评论
提交 加载更多评论
其他资源 yolov3///////////
yolov3///////////
yolov3/////////// yolov3/////////// yolov3///////////
yolov5////////////
yolov5////////////
yolov5//////////// yolov5//////////// yolov5////////////
个人简历Word模板+自我介绍PPT模板.zip
个人简历Word模板10套 自我介绍PPT模板4套 有需要的朋友请自取,如果我的模板帮助到你,别忘了点个赞+关注哦,感谢 /抱拳
个人简历Word模板+自我介绍PPT模板.zip
EasyPR-Java 依赖的相关可用jar包下载
EasyPR-Java是一个基于Java的开源车牌识别系统,相关依赖jar包下载:javacpp-0.11.jar javacv-0.11.jar opencv-2.4.11-0.11.jar opencv-2.4.11 它的核心目标是简化计算机视觉技术在车牌识别中的应用。这个jar包集合包含了几个关键组件,对于理解EasyPR-Java的工作原理及其在实际项目中的应用至关重要。
NetV8,用于VFP专用版
NetV8,用于VFP专用版
大语言模型+llama3+代码+学习可运行llama3代码
本项目基于Meta最新发布的新一代开源大模型Llama-3开发,是Chinese-LLaMA-Alpaca开源大模型相关系列项目(一期、二期)的第三期。本项目开源了中文Llama-3基座模型和中文Llama-3-Instruct指令精调大模型。这些模型在原版Llama-3的基础上使用了大规模中文数据进行增量预训练,并且使用精选指令数据进行精调,进一步提升了中文基础语义和指令理解能力,相比二代相关模型获得了显著性能提升。 我已将如何训练+推理以及vscode配置等内容放入文件夹,你可直接下载按照要求执行,以便进一步解读与学习。当然,我也会在博客解读代码细节,以此帮助大家对大语言模型理解。
大语言模型+llama3+代码+学习可运行llama3代码 大语言模型+llama3+代码+学习可运行llama3代码 大语言模型+llama3+代码+学习可运行llama3代码
基于c语言封装的ftp客户端开源库
ftp
st-link驱动安装包,可以匹配USB
st-link驱动安装包,可以解决初次使用st-link时的端口无法检测到对应的端口问题,本人初次遇到该问题的时候,是在stm32c8t6最小系统板,因为其不具备烧录口,需要外接st-link,但是由于第一次使用,keil5在烧录过程总始终无法检测到,因此进行大量上网搜索才发现需要安装驱动,个人感觉也是新手小白初学时会遇到的问题,也希望能为大家提供帮助