——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明







基于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项目:否;
技术栈 JSP+CSS+JavaScript+servlet+mysql
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中Connector.java配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://localhost:8080/jsp_bysjsys/ 登录 学生账号/密码: student/123456 指导教师账号/密码: teacher/123456 管理员账号/密码:admin/admin
——————————CodeStart——————————
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
| telphone : telphone, }, success : function(str){ $("#message").show(500); $("#message").html(str); $("#message").hide(3000); } }); }
</script>
<body> <header id="top"> <div class="wrapper"> <div id="title"><span>毕业设计管理系统</span></div> <div id="topnav"> <a href="#"><img class="avatar" SRC="img/user_32.png" alt="" /></a> <b> <s:if test='#session.loginUser.role=="sysadmin"'> 系统管理员 </s:if> <s:elseif test='#session.loginUser.role=="student"'> 学生 </s:elseif> <s:elseif test='#session.loginUser.role=="teacher"'> 导师 </s:elseif> <s:elseif test='#session.loginUser.role=="deptadmin"'> 系管理员 </s:elseif> </b>界面 <span>|</span> <a href="logout">注销</a><br /> </div> <nav id="menu">
|
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
|
public class ReportAction { private String message; private String taskid; private Task task = null; private Report report = null; private String overview; private String goal; private String method; private String innovation; private String progress; private String requirement; public String toReportPage(){ TaskDAO taskDao = new TaskDAO(); try { task = taskDao.getTaskByID(taskid); } catch (SQLException e) { e.printStackTrace(); message = "系统错误"; return "notexist"; } return "success"; } public String subReprot(){ ReportDAO reportDao = new ReportDAO(); TaskDAO taskDao = new TaskDAO(); try { reportDao.insertReport(taskid, overview, goal, method, innovation, progress, requirement); taskDao.updateStatus(taskid, "6"); } catch (SQLException e) { e.printStackTrace(); message = "系统错误"; return "notexist"; } message = "提交开题报告成功!"; return "success"; }
|
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
| public String getNewpwd() { return newpwd; }
public void setNewpwd(String newpwd) { this.newpwd = newpwd; }
public User getUser() { return user; }
public void setUser(User user) { this.user = user; }
public String getCollegeName() { return collegeName; }
public void setCollegeName(String collegeName) { this.collegeName = collegeName; }
public String getDeptName() { return deptName; }
public void setDeptName(String deptName) { this.deptName = deptName; }
public String getClassName() { return className; }
public void setClassName(String className) { this.className = className; }
public String getMessage() { return message;
|
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
| } catch (SQLException e){ e.printStackTrace(); } finally { this.connector.closeResultSet(rs); this.connector.closePreparedStatement(ps); this.connector.closeConnection(conn); } return false; }
public void insertDept(String deptid, String dname, String collegeid) throws SQLException { Connection conn = null; PreparedStatement ps = null; try { conn = this.connector.getConnection(); conn.setAutoCommit(false);
ps = conn.prepareStatement(INSERT_NEW_DEPT); ps.setString(1, deptid); ps.setString(2, dname); ps.setString(3, collegeid); if (ps.execute()) { conn.rollback(); System.out.println("--插入专业信息失败。"); } else { System.out.println("--插入专业信息成功。");
conn.commit(); conn.setAutoCommit(true); }
} catch (SQLException e) { throw new SQLException(e); } finally { connector.closePreparedStatement(ps); connector.closeConnection(conn); } }
public void deleteDeptByID(String deptid) throws SQLException { Connection conn = null; PreparedStatement ps = null;
|
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
| conn.setAutoCommit(true); }
} catch (SQLException e) { throw new SQLException(e); } finally { connector.closePreparedStatement(ps); connector.closeConnection(conn); } }
public void deleteCollegeByID(String collegeid) throws SQLException { Connection conn = null; PreparedStatement ps = null; try { conn = this.connector.getConnection(); conn.setAutoCommit(false);
ps = conn.prepareStatement(DELETE_COLLEGE_BY_ID); ps.setString(1, collegeid); if (ps.execute()) { conn.rollback(); System.out.println("--删除学院信息失败。"); } else { System.out.println("--删除学院信息成功。");
conn.commit(); conn.setAutoCommit(true); }
} catch (SQLException e) { throw new SQLException(e); } finally { connector.closePreparedStatement(ps); connector.closeConnection(conn); } }
public boolean isExist(String collegeid) { Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; try { conn = this.connector.getConnection(); ps = conn.prepareStatement(COLLEGE_IS_EXIST);
|
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
| function modifypwd(){ var newpwd = $("#newpwd").val(); var conpwd = $("#conpwd").val();
$.ajax({ url: 'modifypwd', type: 'post', data: { newpwd : newpwd, conpwd : conpwd, }, success : function(str){ $("#message").show(500); $("#message").html(str); $("#message").hide(3000); } }); }
/* 修改联系方式,ajax */ function modifycontact(){ var email = $("#email").val(); var telphone = $("#telphone").val();
$.ajax({ url: 'modifycontact', type: 'post', data: { email : email, telphone : telphone, }, success : function(str){ $("#message").show(500); $("#message").html(str); $("#message").hide(3000); } }); }
</script>
<body> <header id="top">
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=291122532008200qp
https://javayms.pages.dev?id=291122532008200qp