IDEA+Java+Servlet+JSP+Mysql实现学生选课签到系统

这是一个使用Java Servlet、JSP和MySQL构建的在线学生选课签到系统。系统包括用户注册登录、管理员审核用户、管理课程、教师创建课程和签到、学生选课和修改密码等功能。数据库设计包括用户、课程、选课和签到记录等表,实现了课程的增删改查以及学生的加入和退出。部分关键代码如登录、注册、创建课程和删除操作等也进行了展示。
摘要由CSDN通过智能技术生成

一、系统介绍

1.开发环境

开发工具:IDEA2018

JDK版本:jdk1.8

Mysql版本:8.0.13

2.技术选型

Java+Servlet+Boostrap+Jsp+Mysql

3.系统功能

1.用户注册登录系统;

2.管理员审核用户,查看课程选课情况,开启签到,删除课程,修改密码;

3.教师创建课程,查看成员,开启签到,删除课程,修改密码;

4.学生选择课程,退选课程,修改密码;

4.数据库文件

/*
 Navicat Premium Data Transfer

 Source Server         : MYSQL
 Source Server Type    : MySQL
 Source Server Version : 80013
 Source Host           : localhost:3306
 Source Schema         : servlet_select_course

 Target Server Type    : MySQL
 Target Server Version : 80013
 File Encoding         : 65001

 Date: 24/12/2021 16:58:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for tb_courses
-- ----------------------------
DROP TABLE IF EXISTS `tb_courses`;
CREATE TABLE `tb_courses`  (
  `course_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `teach_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `day` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `is_signin` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `member_num` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`course_id`) USING BTREE,
  INDEX `C_FK`(`teach_id`) USING BTREE,
  CONSTRAINT `C_FK` FOREIGN KEY (`teach_id`) REFERENCES `tb_users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tb_courses
-- ----------------------------
INSERT INTO `tb_courses` VALUES (27, '软件工程', '101', '星期一, 1 - 2 节', 'false', 1);
INSERT INTO `tb_courses` VALUES (28, '计算机导论', '104', '星期二, 3 - 4 节', 'false', 0);

-- ----------------------------
-- Table structure for tb_join
-- ----------------------------
DROP TABLE IF EXISTS `tb_join`;
CREATE TABLE `tb_join`  (
  `course_id` int(11) NULL DEFAULT NULL,
  `stu_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `checked` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tb_join
-- ----------------------------
INSERT INTO `tb_join` VALUES (27, '1001', 'true');
INSERT INTO `tb_join` VALUES (28, '1001', 'checking');

-- ----------------------------
-- Table structure for tb_signin
-- ----------------------------
DROP TABLE IF EXISTS `tb_signin`;
CREATE TABLE `tb_signin`  (
  `signin_id` int(11) NOT NULL AUTO_INCREMENT,
  `course_id` int(11) NULL DEFAULT NULL,
  `time` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `signin_num` int(11) NULL DEFAULT NULL,
  `end_time` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`signin_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tb_signin
-- ----------------------------
INSERT INTO `tb_signin` VALUES (24, 27, '2021-12-20 15:15:48', 1, '2021-12-20 15:16:16');

-- ----------------------------
-- Table structure for tb_signin_stu
-- ----------------------------
DROP TABLE IF EXISTS `tb_signin_stu`;
CREATE TABLE `tb_signin_stu`  (
  `signin_id` int(11) NULL DEFAULT NULL,
  `stu_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `state` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tb_signin_stu
-- ----------------------------
INSERT INTO `tb_signin_stu` VALUES (24, '1001', 'true');

-- ----------------------------
-- Table structure for tb_users
-- ----------------------------
DROP TABLE IF EXISTS `tb_users`;
CREATE TABLE `tb_users`  (
  `user_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `name` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `type` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  `checked` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tb_users
-- ----------------------------
INSERT INTO `tb_users` VALUES ('1001', '123456', '同学1', 'stu', 'true');
INSERT INTO `tb_users` VALUES ('1002', '123456', '同学2', 'stu', 'true');
INSERT INTO `tb_users` VALUES ('101', '123456', '教师1', 'teach', 'true');
INSERT INTO `tb_users` VALUES ('102', '123456', '教师2', 'teach', 'true');
INSERT INTO `tb_users` VALUES ('103', '123456', '教师3', 'teach', 'true');
INSERT INTO `tb_users` VALUES ('104', '123456', '王老师', 'teach', 'true');
INSERT INTO `tb_users` VALUES ('105', '123456', '李老师', 'teach', 'false');
INSERT INTO `tb_users` VALUES ('admin', 'admin', '管理员', 'admin', 'true');

SET FOREIGN_KEY_CHECKS = 1;

二、系统展示

1.登录系统

2.注册系统

3.管理员-首页

4.管理员-管理用户

5.管理员-管理课程

6.管理员-修改密码

7.教师-创建课程

8.教师-我的课程

9.教师-修改密码

10.学生-加入课程

11.学生-我的课程

12.学生-修改密码

三、部分代码

CreateCourseAction

package com.sjsq.servlet;

import com.sjsq.bean.Course;
import com.sjsq.bean.User;
import com.sjsq.dao.CourseDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
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.io.PrintWriter;

@WebServlet("/CreateCourseAction")
@MultipartConfig

public class CreateCourseAction extends HttpServlet {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        super.doGet(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        PrintWriter out = resp.getWriter();

        String courseName = req.getParameter("courseName");
        String day = req.getParameter("day");
        String courseTime = req.getParameter("courseTime");

        String Day = day + ", " + courseTime;

        User user = (User) req.getSession().getAttribute("User");
        String teach_id = user.getId();

        Course course = new Course(0, courseName, teach_id, Day, "false", 0);

        CourseDao courseDao = new CourseDao();
        int result = courseDao.Create(course);
        if (result == 0) {
            out.println("<script> alert('创建课程失败'); location='teacher_create.jsp'; </script>");
        } else if (result == 1) {
            out.println("<script> alert('创建课程成功'); location='teacher_create.jsp'; </script>");
        } else {
            out.println("<script> alert('上课时间冲突'); location='teacher_create.jsp'; </script>");
        }

    }

}


DeleteAction

package com.sjsq.servlet;

import com.sjsq.dao.CourseDao;
import com.sjsq.dao.JoinDao;
import com.sjsq.dao.UserDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
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.io.PrintWriter;
import java.sql.SQLException;


@WebServlet("/DeleteAction")
@MultipartConfig

public class DeleteAction extends HttpServlet {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {


        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        PrintWriter out = resp.getWriter();


        String ope = req.getParameter("ope");
        if (ope.equals("userdel")) {
            // 删除用户

            String user_id = req.getParameter("user_id");
            UserDao userDao = new UserDao();
            if (userDao.DelUser(user_id) == 1) {
                out.println("<script> alert('删除成功'); location='toaudit.jsp'; </script>");
            } else {
                out.println("<script> alert('删除失败'); location='toaudit.jsp'; </script>");
            }

        } else if (ope.equals("useradd")) {
            // 用户审核

            String user_id = req.getParameter("user_id");
            UserDao userDao = new UserDao();
            try {
                if (userDao.Check(user_id) == 1) {
                    out.println("<script> alert('审核通过'); location='toaudit.jsp'; </script>");
                } else {
                    out.println("<script> alert('操作失败'); location='toaudit.jsp'; </script>");
                }
            } catch (SQLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                out.println("<script> alert('操作失败'); location='toaudit.jsp'; </script>");
            }
        } else if (ope.equals("coursedel")) {
            // 课程删除

            String c = req.getParameter("course_id");
            String type = req.getParameter("type");
            int course_id = Integer.valueOf(c);

            CourseDao courseDao = new CourseDao();

            if (courseDao.DelCourse(course_id) == 1) {
                if (type.equals("admin")) {
                    out.println("<script> alert('课程删除成功'); location='show_all_courses.jsp'; </script>");
                } else {
                    out.println("<script> alert('课程删除成功'); location='my_courses.jsp'; </script>");
                }
            } else {
                if (type.equals("admin")) {
                    out.println("<script> alert('课程删除失败'); location='show_all_courses.jsp'; </script>");
                } else {
                    out.println("<script> alert('课程删除失败'); location='my_courses.jsp'; </script>");
                }
            }

        } else if (ope.equals("joindel")) {
            // 退出选课

            String c = req.getParameter("course_id");
            String user_id = req.getParameter("user_id");
            int course_id = Integer.valueOf(c);
            String from_ = req.getParameter("from_");
            JoinDao joinDao = new JoinDao();

            if (joinDao.Delete(course_id, user_id) == 1) {
                out.println("<script> alert('退出成功'); location='" + from_ + "'; </script>");
            } else {
                out.println("<script> alert('退出失败'); location='" + from_ + "'; </script>");
            }
        }


    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        super.doPost(req, resp);
    }
}

LoginAction

package com.sjsq.servlet;

import com.sjsq.bean.User;
import com.sjsq.dao.UserDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
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.io.PrintWriter;
import java.sql.SQLException;

@WebServlet("/LoginAction")
@MultipartConfig
public class LoginAction extends HttpServlet {

    private static final long serialVersionUID = 1L;

    public LoginAction() {
        super();

    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        resp.sendRedirect("login.jsp");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        PrintWriter out = resp.getWriter();

        String user_id = req.getParameter("inputUser_id");   // 从name属性中获取
        String userPass = req.getParameter("inputPassword");

        User user = new User();
        user.setId(user_id);
        user.setPassword(userPass);

        UserDao userDao = new UserDao();
        User user2;
        try {
            user2 = userDao.Query(user);
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            out.println("<script> alert('登陆失败'); location='login.jsp'; </script>");
            return;
        }

        if ((user2.getId()).equals("")) {
            // 用户不存在
            out.println("<script> alert('用户不存在'); location='login.jsp'; </script>");
        } else if (user2.getPassword().equals(userPass)) {
            // 登陆成功
            req.getSession(true).setAttribute("User", user2);

            out.println("<script> alert('登陆成功'); location='index.jsp'; </script>");
        } else {
            // 密码错误
            out.println("<script> alert('密码错误'); location='login.jsp'; </script>");
        }
    }
}


LogoutAction

package com.sjsq.servlet;

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 javax.servlet.http.HttpSession;
import java.io.IOException;

@WebServlet("/LogoutAction")
public class LogoutAction extends HttpServlet {

    private static final long serialVersionUID = 1L;

    public LogoutAction() {
        super();

    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {

        HttpSession session = req.getSession(false);
        if (session == null) {
            resp.sendRedirect("login.jsp");
            return;
        }
        session.removeAttribute("User");
        resp.sendRedirect("login.jsp");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {

        doGet(req, resp);
    }
}


MulAction

package com.sjsq.servlet;

import com.sjsq.bean.Join;
import com.sjsq.dao.CourseDao;
import com.sjsq.dao.JoinDao;
import com.sjsq.dao.SigninDao;
import com.sjsq.dao.SigninStuDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
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.io.PrintWriter;


@WebServlet("/MulAction")
@MultipartConfig

public class MulAction extends HttpServlet {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        PrintWriter out = resp.getWriter();

        String ope = req.getParameter("ope");

        if (ope.equals("joincreat")) {
            String c = req.getParameter("course_id");
            String user_id = req.getParameter("user_id");
            int course_id = Integer.valueOf(c);
            Join join = new Join(course_id, user_id, "checking");

            JoinDao joinDao = new JoinDao();

            int result = joinDao.Creat(join);
            if (result == 2) {
                out.println("<script> alert('课程已经选过'); location='show_all_courses.jsp'; </script>");
            } else if (result == 1) {
                out.println("<script> alert('加入成功'); location='show_all_courses.jsp'; </script>");
            } else {
                out.println("<script> alert('加入失败'); location='show_all_courses.jsp'; </script>");
            }

        } else if (ope.equals("joinaccept")) {
            String c = req.getParameter("course_id");
            String user_id = req.getParameter("user_id");
            int course_id = Integer.valueOf(c);
            String from_ = req.getParameter("from_");

            JoinDao joinDao = new JoinDao();

            int result = joinDao.Update(course_id, user_id, "true");

            if (result == 1) {
                out.println("<script> alert('通过成功'); location='" + from_ + "'; </script>");
            } else {
                out.println("<script> alert('通过失败'); location='" + from_ + "'; </script>");
            }

        } else if (ope.equals("signincreat")) {
            String c = req.getParameter("course_id");
            int course_id = Integer.valueOf(c);
            String from_ = req.getParameter("from_");

            SigninDao signinDao = new SigninDao();

            int result = signinDao.Creat(course_id);

            if (result == 1) {
                SigninStuDao signinStuDao = new SigninStuDao();
                CourseDao courseDao = new CourseDao();
                int signin_id = signinDao.FindLast(course_id);
                signinStuDao.Creat(signin_id, course_id);
                courseDao.Update(course_id, "true");
                out.println("<script> alert('签到已开始'); location='" + from_ + "'; </script>");
            } else {
                out.println("<script> alert('开始失败'); location='" + from_ + "'; </script>");
            }
        } else if (ope.equals("signinstop")) {
            String c = req.getParameter("course_id");
            int course_id = Integer.valueOf(c);
            String from_ = req.getParameter("from_");

            CourseDao courseDao = new CourseDao();
            int result = courseDao.Update(course_id, "false");
            if (result == 1) {
                SigninDao signinDao = new SigninDao();
                signinDao.Update(signinDao.FindLast(course_id));
                out.println("<script> alert('签到已停止'); location='" + from_ + "'; </script>");
            } else {
                out.println("<script> alert('停止失败'); location='" + from_ + "'; </script>");
            }
        } else if (ope.equals("signin")) {
            String stu_id = req.getParameter("stu_id");
            String c = req.getParameter("signin_id");
            int signin_id = Integer.valueOf(c);
            String from_ = java.net.URLDecoder.decode(req.getParameter("from_"), "UTF-8");

            SigninStuDao signinStuDao = new SigninStuDao();

            int result = signinStuDao.Update(signin_id, stu_id, "true");
            if (result == 1) {
                SigninDao signinDao = new SigninDao();
                signinDao.AddNum(signin_id);
                out.println("<script> alert('签到成功'); location='" + from_ + "'; </script>");
            } else {
                out.println("<script> alert('签到失败'); location='" + from_ + "'; </script>");
            }
        }
    }
}


RegisterAction

package com.sjsq.servlet;

import com.sjsq.bean.User;
import com.sjsq.dao.UserDao;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
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.io.PrintWriter;

@WebServlet("/RegisterAction")
@MultipartConfig

public class RegisterAction extends HttpServlet {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    public RegisterAction() {

        super();
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        RequestDispatcher rd = req.getRequestDispatcher("register.jsp");
        rd.forward(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        PrintWriter out = resp.getWriter();

        String user_id = req.getParameter("inputUser_id");
        String userPass = req.getParameter("inputPassword");
        String Confirm = req.getParameter("confirmPassword");
        String name = req.getParameter("inputName");
        String type = req.getParameter("type");
        int flag = 0;
        for (int i = 0; i < user_id.length(); i++) if (user_id.charAt(i) < '0' || user_id.charAt(i) > '9') flag++;
        if (flag != 0) {
            out.println("<script> alert('学号只能含有数字'); location='register.jsp'; </script>");
        } else if (!userPass.equals(Confirm)) {
            out.println("<script> alert('两次密码不相同'); location='register.jsp'; </script>");
        } else {

            User user = new User(user_id, userPass, name, type);
            UserDao userDao = new UserDao();
            int result = userDao.create(user);
            if (result == 1) {
                out.println("<script> alert('注册成功'); location='login.jsp'; </script>");
            } else {
                if (result == 0) out.println("<script> alert('注册失败'); location='register.jsp'; </script>");
                else out.println("<script> alert('该账号已被注册'); location='register.jsp'; </script>");
            }

        }
    }

}


UpdateUserAction

package com.sjsq.servlet;

import com.sjsq.bean.User;
import com.sjsq.dao.UserDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;


@WebServlet("/UpdateUserAction")
@MultipartConfig


public class UpdateUserAction extends HttpServlet {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        super.doGet(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        PrintWriter out = resp.getWriter();

        String oldPass = req.getParameter("oldPassword");
        String newPass = req.getParameter("newPassword");
        String Confirm = req.getParameter("confirmPassword");

        if (!newPass.equals(Confirm)) {
            out.println("<script> alert('两次密码不相同'); location='update_user.jsp'; </script>");
        } else {

            User user = (User) req.getSession().getAttribute("User");
            if (!user.getPassword().equals(oldPass)) {
                out.println("<script> alert('原密码错误'); location='update_user.jsp'; </script>");
            } else {
                UserDao userDao = new UserDao();
                int result = 0;
                try {
                    result = userDao.Update(user.getId(), newPass);
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                if (result == 1) {
                    HttpSession session = req.getSession(false);
                    session.removeAttribute("User");
                    out.println("<script> alert('修改密码成功'); location='login.jsp'; </script>");
                    resp.sendRedirect("login.jsp");
                } else {
                    out.println("<script> alert('修改密码失败'); location='update_user.jsp'; </script>");
                    resp.sendRedirect("update_user.jsp");
                }
            }

        }
    }

}

四、其他

1.更多系统

Java+JSP系统系列实现

Java+JSP实现学生图书管理系统

Java+JSP实现学生信息管理系统

Java+JSP实现用户信息管理系统

Java+Servlet系统系列实现

Java+Servlet+JSP实现航空订票系统

Java+Servlet+JSP实现新闻发布系统

Java+Servlet+JSP学生宿舍管理系统

Java+Servlet+JSP实现图书管理系统

Java+Servlet+JSP实现停车场管理系统

Java+Servlet+JSP实现房屋租赁管理系统

Java+Servlet+JSP实现学生信息管理系统

Java+Servlet+JSP实现学生选课管理系统

Java+Servlet+JSP实现宠物诊所管理系统

Java+Servlet+JSP实现学生成绩管理系统-1

Java+Servlet+JSP实现学生成绩管理系统-2

Java+SSM系统系列实现

J​​​ava+SSM+JSP实现网上考试系统

Java+SSM+JSP实现宠物商城系统

Java+SSM+JSP实现超市管理系统

Java+SSM+JSP实现学生成绩管理系统

Java+SSM+JSP实现学生信息管理系统

Java+SSM+JSP+Maven实现网上书城系统

Java+SSM+JSP+Maven实现学校教务管理系统

Java+SSH系统系列实现

Java+SSH+JSP实现在线考试系统

Java+SSH+JSP实现医院在线挂号系统

Java+Springboot系统系列实现

Java+Springboot+H-ui+Maven实现营销管理系统

Java+Springboot+Bootstrap+Maven实现网上商城系统

Java+Springboot+Bootstrap+Maven实现景区旅游管理系统

1.更多JavaWeb系统请关注专栏。

https://blog.csdn.net/helongqiang/category_10020130.htmlhttps://blog.csdn.net/helongqiang/category_10020130.html

2.更多JavaSwing系统请关注专栏。

https://blog.csdn.net/helongqiang/category_6229101.htmlhttps://blog.csdn.net/helongqiang/category_6229101.html

2.源码下载

sql在sql文件夹下面

Java+Servlet+JSP+Mysql实现Web学生选课签到系统

3.备注

如有侵权请联系我删除。

4.支持博主

如果您觉得此文对您有帮助,请点赞加关注加收藏。祝您生活愉快!想要获取其他资源可关注左侧微信公众号获取!

学生成绩管理系统是一个比较典型的Web应用程序,可以使用Java ServletJSP技术实现。下面是一个简单实现步骤: 1. 确定系统功能和设计数据库表 首先,我们需要确定学生成绩管理系统的功能需求,例如学生信息管理、课程信息管理、成绩录入和查询等等。然后,设计数据库表格以存储数据。 例如,我们可以设计以下几个表格: 学生表(Student):学生ID、姓名、性别、出生日期、联系方式等。 课程表(Course):课程ID、课程名称、学分等。 成绩表(Score):学生ID、课程ID、成绩等。 2. 创建项目和配置环境 使用IntelliJ IDEA创建一个Web项目,然后配置环境。我们需要配置Tomcat服务器、MySQL数据库连接和JDBC驱动程序等。 3. 实现数据访问层 在项目中创建一个Java类,用于实现数据库的访问操作。我们可以使用JDBC技术连接数据库,然后实现数据的增删改查操作。 4. 实现业务逻辑层 在项目中创建另一个Java类,用于实现业务逻辑。例如,实现学生信息管理、课程信息管理、成绩录入和查询等功能。 5. 实现表示层 使用JSP技术实现用户界面,为用户提供交互界面。例如,实现学生信息管理页面、课程信息管理页面、成绩录入页面和查询页面等。 6. 部署和测试系统 最后,我们需要将项目部署到Tomcat服务器上,并测试学生成绩管理系统的功能和性能。 总之,使用IntelliJ IDEAJava ServletJSPMySQL和Tomcat等技术实现学生成绩管理系统是非常简单的。只需要按照上述步骤一步步实现,就可以得到一个完整的Web应用程序。
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

水坚石青

你的鼓励是我更新的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值