• 基于javaweb的学生作业管理系统


    一、系统简介


    本项目采用eclipse工具开发,jsp+servlet+jquery技术编写,数据库采用的是mysql,navicat开发工具。

    系统一共分为3个角色分别是:管理员,学生,教师

    二、模块简介

    管理员

    1、登录

    2、个人信息管理

    3、统计管理

    4、学生管理

    5、教师管理

    6、班级管理

    7、公告管理

    8、教学资料管理

    9、留言管理

    学生

    1、登录

    2、个人信息管理

    3、查看公告

    4、查看教学资料

    5、留言管理

    6、查看作业

    7、下载作业

    8、完成并上传作业

    9、历史数据查询

    教师

    1、登录

    2、个人信息管理

    3、查看公告

    4、查看教学资料

    5、留言管理

    6、作业管理

    7、评阅学生作业

    项目简介


    难度等级:✩✩✩
    用户类型:3角色(
    管理员,学生,教师
    设计模式:MVC
    项目架构:B/S架构
    开发语言:Java语言
    前端技术:HTML、CSS、JS、JQuery等
    后端技术:JSP、servlet框架
    运行环境:Windows7或10、JDK1.8
    运行工具:本系统采用Eclipse开发,仅支持Eclipse运行,不支持MyEclipse和IDEA运行,因为三者的骨架不一样,强行导入打开运行可能会导致出现未知的错误。(如若想用idea运行,需要转换!!!!)
    数  据  库:MySQL5.5/5.7/8.0版本
    运行服务器:Tomcat7.0/8.0/8.5/9.0等版本
    是否基于Maven环境:否
    是否采用框架:是
    数据库表数量:9张表
    JSP页面数量:20多张
    是否有分页:有分页

     

    相关截图

    相关代码

    登录

    1. <%@ page language="java" contentType="text/html; charset=utf-8"
    2. pageEncoding="utf-8"%>
    3. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    4. <%
    5. String path = request.getContextPath();
    6. String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    7. %>
    8. html>
    9. <html lang="en" class="h-100">
    10. <head>
    11. <meta charset="utf-8">
    12. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    13. <meta name="keywords" content="" />
    14. <meta name="author" content="" />
    15. <meta name="robots" content="" />
    16. <meta name="viewport" content="width=device-width, initial-scale=1">
    17. <meta name="description" content="Fillow : Fillow Saas Admin Bootstrap 5 Template" />
    18. <meta name="format-detection" content="telephone=no">
    19. <title>作业管理系统title>
    20. <link rel="shortcut icon" type="image/png" href="images/favicon.png" />
    21. <link href="resource/css/style.css" rel="stylesheet">
    22. head>
    23. <body class="vh-100">
    24. <div class="authincation h-100">
    25. <div class="container h-100">
    26. <div class="row justify-content-center h-100 align-items-center">
    27. <div class="col-md-6">
    28. <div class="authincation-content">
    29. <div class="row no-gutters">
    30. <div class="col-xl-12">
    31. <div class="auth-form">
    32. <h4 class="text-center mb-3">作业管理系统登录h4>
    33. <form id="loginForm" >
    34. <div class="mb-3">
    35. <label class="mb-1"><strong>用户名strong>label>
    36. <input type="text" name="userName" id="userName" class="form-control" value="">
    37. div>
    38. <div class="mb-3">
    39. <label class="mb-1"><strong>密码strong>label>
    40. <input type="password" name="password" id="password" class="form-control" value="Password">
    41. div>
    42. <div class="row d-flex justify-content-between mt-4 mb-2">
    43. <div class="mb-3">
    44. <input type="radio" class="form-check-input" name="type" value="1" checked id="basic_checkbox_1">
    45. <label class="form-check-label" for="basic_checkbox_1">管理员label>
    46.        
    47. <input type="radio" class="form-check-input" name="type" value="2" id="basic_checkbox_2">
    48. <label class="form-check-label" for="basic_checkbox_2">学生label>
    49.        
    50. <input type="radio" class="form-check-input" name="type" value="3" >
    51. <label class="form-check-label" >教师label>
    52. div>
    53. div>
    54. <div class="text-center">
    55. <button type="button" id="login" class="btn btn-primary btn-block">登录button>
    56. div>
    57. form>
    58. div>
    59. div>
    60. div>
    61. div>
    62. div>
    63. div>
    64. div>
    65. div>
    66. <script src="resource/vendor/global/global.min.js">script>
    67. <script src="resource/js/custom.min.js">script>
    68. <script src="resource/js/dlabnav-init.js">script>
    69. <script src="resource/js/styleSwitcher.js">script>
    70. <script src="resource/layui/jquery-1.9.1.min.js">script>
    71. body>
    72. <script>
    73. $("#login").on("click", function() {
    74. var userName = $("#userName").val().trim(); // trim()去除空格
    75. var password = $("#password").val().trim();
    76. var type = $("#type").val();
    77. if(userName == ""){
    78. alert('用户名不能为空!');
    79. return false;
    80. }
    81. if(password == ""){
    82. alert('密码不能为空!');
    83. return false;
    84. }
    85. if(type == ""){
    86. alert('请选择角色!');
    87. return false;
    88. }
    89. $.ajax({
    90. cache : true,
    91. type : "post",
    92. url : "LoginServlet?action=login",
    93. data : $("#loginForm").serialize(),
    94. async : false,
    95. success : function(e) {
    96. if (e == 'yes') {
    97. alert("登录成功!");
    98. window.parent.location.href = "LoginServlet?action=toMain";
    99. } else {
    100. alert("登录失败,账号或者密码错误!");
    101. }
    102. }
    103. })
    104. });
    105. script>
    106. html>
    1. protected void login(HttpServletRequest request, HttpServletResponse response) throws Exception {//跳转到添加用户界�?
    2. String userName = request.getParameter("userName");
    3. String password = request.getParameter("password");
    4. String type = request.getParameter("type");
    5. String message = "no";
    6. if(type != null && type.equals("1")){//admin
    7. Admin admin = service.selectAdmin(userName,password);
    8. if (admin != null) {
    9. message = "yes";
    10. request.getSession().setAttribute("flag",1);
    11. request.getSession().setAttribute("admin",admin);
    12. }
    13. }else if(type != null && type.equals("2")){
    14. Student student = service.selectStudent(userName,password);
    15. if (student != null) {
    16. message = "yes";
    17. request.getSession().setAttribute("flag",2);
    18. request.getSession().setAttribute("student",student);
    19. }
    20. }else if(type != null && type.equals("3")){
    21. Teacher teacher = service.selectTeacher(userName,password);
    22. if (teacher != null) {
    23. message = "yes";
    24. request.getSession().setAttribute("flag",3);
    25. request.getSession().setAttribute("teacher",teacher);
    26. }
    27. }
    28. response.getWriter().print(message);
    29. }

    其他相关代码都是类似的,主要是前端jsp和后端servlet交互比较重要!!!非开源!!!!!!

    项目截图中的数据,很多是用来测试的,需要自行添加合适的数据图片!!
    喜欢的朋友的点赞加关注,感兴趣的同学可以研究!!!!!
    感谢  = v =

  • 相关阅读:
    不小心清空了回收站怎么恢复,回收站删除的东西可以恢复吗
    “懒宅经济”崛起,智能家电品牌快收好这份软文推广指南
    mysql 中 in 的用法
    【gitlab】从其他仓库创建项目
    小微企业低成本获客攻略,媒介盒子无偿分享
    关于 yield 关键字【C# 基础】
    我要写整个中文互联网界最牛逼的JVM系列教程 | 「JVM与Java体系架构」章节:JVM的发展历程
    2021icpc南京 H. Crystalfly
    【无标题】LeetCode题解:19. 删除链表的倒数第 N 个结点,JavaScript,详细注释
    非零基础自学Java (老师:韩顺平) 第8章 面向对象编程(中级部分) 8.12 Object类详解
  • 原文地址:https://blog.csdn.net/qq_43485489/article/details/126391296