College course construction project review system based on javaweb (idea+servlet+jsp)

1. System introduction

This project usesidea tool development, jsp+servlet +jquery written in technology, the database uses mysql, navicat development tool .

The system is divided into three roles: teachers, administrators, and reviewers.

2. Module Introduction

administrator

1. Login

2. Personal information management

3. Statistical management

4. Teacher management

5. Reviewer management

6. Project application management

7. Attachment download

teacher

1. Login

2. Personal information management

3. Project management

4. Declaration project

5. Attachment download

Reviewers

1. Login

2. Project management

3. Approval projects

4. Attachment download

5. Personal information management

Project Introduction
Difficulty level: ✩✩✩
User type: 3 roles (teacher, administrator, reviewer)< a i=3> Design pattern: MVC Project architecture: B/S architecture Development language: Java language Front-end technology: HTML, CSS, JS, JQuery, etc. Back-end technology: JSP, servlet framework Running environment: Windows 7 or 10, JDK1.8 Running tools: This system is developed using idea. It only supports idea running and does not support MyEclipse and eclipse running. Because the skeletons of the three are different, forcing the import to open and run may cause unknown errors. Database: MySQL5.5/5.7/8.0 version Running server: Tomcat7.0/8.0/8.5/9.0 and other versions Whether it is based on Maven environment: No Whether it uses a framework: Yes Number of database tables: 4 tables JSP page Quantity: more than 10 pieces Whether there is pagination: There is pagination













Related screenshots

Related code

Log in

<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
          + path + "/";
%>
<jsp:include page="/WEB-INF/common/header.jsp"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/login.css" media="all">
</head>
<body>
<div class="layui-container">
  <div class="admin-login-background">
    <div class="layui-form login-form">
      <form class="layui-form" action="LoginServlet?action=login" method="post">
        <div class="layui-form-item logo-title">
          <h1>高校课程建设项目评审系统登录</h1>
        </div>
        <div class="layui-form-item">
          <label class="layui-icon layui-icon-username"></label>
          <input type="text" name="username" id="username" placeholder="用户名或工号" autocomplete="off" class="layui-input" value="admin">
          <span style="color:red;" >${msg}</span>
          <span style="color:red;" id="msg"></span>
        </div>
        <div class="layui-form-item">
          <label class="layui-icon layui-icon-password"></label>
          <input type="password" name="pwd" id="pwd" placeholder="密码" autocomplete="off" class="layui-input" value="123456">
        </div>
        <div class="layui-form-item">


          &nbsp;<input type="radio" name="type" value="1" title="教师"checked>&emsp;
            <input type="radio" name="type" value="2" title="评审人员" >&emsp;
            <input type="radio" name="type" value="3" title="管理员" >

        </div>
        <div class="layui-form-item">
          <%--<input type="checkbox" name="rememberMe" value="true" lay-skin="primary" title="记住密码">--%>
        </div>
        <div class="layui-form-item">
          <button class="layui-btn layui-btn layui-btn-normal layui-btn-fluid" id="login" type="submit">登录</button>
        </div>
       <%-- <div class="layui-form-item">
          <button class="layui-btn layui-btn layui-btn-primary layui-btn-fluid" id="registe" type="submit">注册</button>
        </div>--%>
      </form>
    </div>
  </div>
</div>
<script src="${pageContext.request.contextPath}/static/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<%--<script src="${pageContext.request.contextPath}/static/lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>--%>
<script>
  layui.use(['form'], function () {
    var form = layui.form,
            layer = layui.layer;

    // 登录过期的时候,跳出ifram框架
    if (top.location != self.location) top.location = self.location;

    // 粒子线条背景
    $(document).ready(function(){
      $('.layui-container').particleground({
        dotColor:'#7ec7fd',
        lineColor:'#7ec7fd'
      });
    });
    $("#login").on("click", function() {
      var username = $("#username").val().trim(); // trim()去除空格
      var pwd = $("#pwd").val().trim();

      if(!username) {
        $("#msg").html("用户名或者工号不能为空!");
        $("#username").focus(); // 聚焦
        return false;
      } else {
        if(!pwd) {
          $("#msg").html("密码不能为空!");
          $("#pwd").focus(); // 聚焦
          return false;
        } else {
          $("#msg").html("");
        }
      }
    });


  });
</script>
</body>
</html>
//登录操作
    protected void login(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//处理登录
		request.getSession().invalidate();
        String username = request.getParameter("username").trim();//接收学号/工号
        String pwd = request.getParameter("pwd").trim();
        int type=Integer.parseInt(request.getParameter("type").trim());
	       switch (type) {
			   case 1:
				   Teacher teacher=ts.login(username,pwd);
				   System.out.println(username+pwd+"type=1"+username);
				   if(teacher==null){
					   request.setAttribute("msg","教师工号不存在或者密码错误"); //绑定参数
					   request.getRequestDispatcher("/WEB-INF/page/login.jsp").forward(request,response);
				   }else {
					   request.getSession().setAttribute("teacher", teacher);
					   request.getSession().setAttribute("type", 1);
					   request.getRequestDispatcher("/WEB-INF/page/main.jsp").forward(request,response);
				   }
				   break;


			   case 2:
				   User user=us.login(username,pwd);
				   System.out.println(username+pwd+"type=1"+username);
				   if(user==null){
					   request.setAttribute("msg","评审员用户名不存在或者密码错误"); //绑定参数
					   request.getRequestDispatcher("/WEB-INF/page/login.jsp").forward(request,response);
				   }else {
					   request.getSession().setAttribute("user", user);
					   request.getSession().setAttribute("type", 2);
					   request.getRequestDispatcher("/WEB-INF/page/main.jsp").forward(request,response);
				   }
				   break;

			   case 3:
				   Admin admin=as.login(username,pwd);
				   System.out.println(username+pwd+admin);
				   if(admin==null){
					   request.setAttribute("msg","管理员用户名或者密码错误"); //绑定参数
					   request.getRequestDispatcher("/WEB-INF/page/login.jsp").forward(request,response);
				   }else {
					   request.getSession().setAttribute("admin", admin);
					   request.getSession().setAttribute("type", 3);
					   request.getRequestDispatcher("/WEB-INF/page/main.jsp").forward(request,response);

				   }
				   break;

	       }
    }
    

Not open source! ! ! ! ! !
Many of the data in the project screenshots are used for testing. You need to add appropriate data pictures by yourself.

This project is suitable for beginners to learn from. The overall project is relatively simple. , can be used for homework in final assessment, course design, graduation design, etc.! ! ! ! !
Like and follow friends who like it, and interested students can study it! ! ! ! !
 

Guess you like

Origin blog.csdn.net/qq_43485489/article/details/126466014