基于javaweb的JSP+Servlet学校在线报考系统(java+jsp+javascript+servlet+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

140023592402

150023592402

160023592402

170023592402

180023592402

190023592402

基于javaweb的JSP+Servlet学校在线报考系统(java+jsp+javascript+servlet+mysql)

项目介绍

本项目分为管理员、教务人员、招生人员、学生等角色;

管理员角色主要功能包括: 系统状态、阶段定义、管理员维护、数据库管理、查看报名信息、我的登录历史、修改密码、退出系统;

教务人员主要功能包括: 系统状态、查看报名信息、准考证号分配、考场分配、录入成绩、我的登录历史、修改密码、退出系统;

招生人员主要功能包括: 系统状态、阶段设置、招考信息设置、查看报名信息、现场确认、学生密码清零、我的登录历史、修改密码、退出系统;

学生角色主要功能包括: 报考须知、我的报名信息、上传照片、报名表打印、准考证打印、成绩与录取查询、我的登录历史、修改密码、退出系统等;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;  5.数据库:MySql 5.7版本; 6.是否Maven项目:否;

技术栈

  1. 后端:Servlet 2. 前端:JSP+JavaScript+CSS

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中WebRoot/META-INF/context.xml配置文件中的数据库配置改为自己的配置; 4. 运行项目,学生角色使用http://localhost:8080/bkxt/index.jsp进行登录 学生账号/密码:zjfhit/123456 管理员登录:http://localhost:8080/bkxt/manage.jsp 管理员账号/密码:manager/123456 教务人员账号/密码:jiaowu/123456 招生人员账号/密码:zhaoban/123456

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
      }
}else{
response.sendRedirect(servletContext.getContextPath()+"/zadmin/stumanage.jsp");
}
}

/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}

}
package com.tjzhic.servlet;




public class JAdminRoom extends HttpServlet {

/**
* Constructor of the object.
*/
public JAdminRoom() {
super();
}

/**
* Destruction of the servlet. <br>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

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

/**
* Constructor of the object.
*/
public ZAdminStuManage() {
super();
}

/**
* Destruction of the servlet. <br>
*/
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}

/**
* The doGet method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

this.doPost(request, response);
}

/**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
		if (action.equals("assign")) {
int number = Integer.parseInt(request.getParameter("perRoom"));
ArrayList<Reginfo> regs = regInfoD.findByIncrease();
int totalNumber = regs.size();
request.getSession().setAttribute("reginfos", regs);
request.getSession().setAttribute("perRoom", number);
int remain = totalNumber % number;
int roomNum = remain == 0 ? totalNumber / number : totalNumber
/ number + 1;
System.out.println(remain);
System.out.println(roomNum);
request.setAttribute("room", roomNum);
request.setAttribute("perroom", number);
request.setAttribute("remain", remain);
} else if (action.equals("assure")) {
ArrayList<Reginfo> regsAssure = (ArrayList<Reginfo>) request
.getSession().getAttribute("reginfos");
int number = (Integer) request.getSession().getAttribute(
"perRoom");
String[] rooms = request.getParameterValues("rooms");
System.out.println(regsAssure.size());
Iterator<Reginfo> regIter = regsAssure.iterator();
int exameNum = 1;
for (String room : rooms) {
for (int i = 1; i <= number; i++) {
if (!regIter.hasNext())
break;
Reginfo tempReg = regIter.next();
regInfoD.update(tempReg.getUsername(), exameNum + "-"
+ room, i);
}
exameNum++;
}
}
}
request.getRequestDispatcher("/jadmin/assignroom.jsp").forward(request,
response);
}

/**
* Initialization of the servlet. <br>
*
* @throws ServletException
* if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
			String shoolCode = school.getShcode();
String year = school.getShyear();
String testcardnum = year + shoolCode;

for (Major major : majors) {
map.put(major.getMname(), 1);
}
for (Reginfo reg : array) {
MajorDaoImpl majorimp = new MajorDaoImpl();
if (reg.getIsconfirm() == 0)
continue;
String tempMajor = reg.getMname();
int tempNum = (Integer) map.get(tempMajor);
map.put(tempMajor, tempNum + 1);
testcardnum = testcardnum + majorimp.getByName(tempMajor)
+ tempNum;
reginfoDao.addCode(reg.getUsername(), testcardnum);
}
}
PageModel<Reginfo> pm = recordDao.pageReginfo(pageSize, pageNo);
pm.setPageNav(request.getRequestURI());
request.setAttribute("pm", pm);
request.getRequestDispatcher("/jadmin/assignnum.jsp").forward(request,
response);
}

/**
* Initialization of the servlet. <br>
*
* @throws ServletException
* if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}

}
package com.tjzhic.servlet;


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    return "";
}
/**
* Initialization of the servlet. <br>
*
* @throws ServletException if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}

}
package com.tjzhic.servlet;




public class AdminLogin extends HttpServlet {

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

/**
* Constructor of the object.
*/
public AdminLogin() {
super();
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
						+ tempNum;
reginfoDao.addCode(reg.getUsername(), testcardnum);
}
}
PageModel<Reginfo> pm = recordDao.pageReginfo(pageSize, pageNo);
pm.setPageNav(request.getRequestURI());
request.setAttribute("pm", pm);
request.getRequestDispatcher("/jadmin/assignnum.jsp").forward(request,
response);
}

/**
* Initialization of the servlet. <br>
*
* @throws ServletException
* if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}

}
package com.tjzhic.servlet;




public class StuEntry extends HttpServlet {

/**
* Constructor of the object.
*/
public StuEntry() {
super();
}


项目链接:
https://javayms.github.io?id=531122572008200ug
https://javayms.pages.dev?id=531122572008200ug