IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 开发测试 -> JavaWeb项目 MVC模式 监考管理系统 -> 正文阅读

[开发测试]JavaWeb项目 MVC模式 监考管理系统

? ? ? ?本文为JavaWeb项目课程设计,通过利用MVC模式,前端JSP+CSS界面展示,控制器用Servlet完成页面跳转,JavaBean完成数据库类、用户类、教师类等封装,开发出的一款教师监考管理系统。

2.2.1管理员

管理员为本系统的主要操纵者,可以完成几乎所有的功能,其总结功能需求如下:

  1. 需要输入正确的账号密码登录整个系统;
  2. 能够查看当前待排考试信息;
  3. 能够查看当前考场状态信息;
  4. 能够查看当前已分配监考教师及地点考场信息;

? ? ?5. 能够实现为每个考场分配合理的考场;

? ? ?6. 能够对每种信息进行单项增加或用excel导入MySql批量式增加;

  1. 能够对每种信息进行删除、修改、查询的操作;
  2. 能够按照班级考试人数为考试科目合理分配监考教师;
  3. 能够单独分配或批量一键分配;
  4. 能够一键处理或手动处理教师请求调换信息;
  5. 能够对监考教师请求信息和监考信息完成后发送邮件提醒;
  6. 具有良好的可视化前端界面和温馨提示;
  7. 能够显示当前已有任务的教师总监考次数;

2.2.2 教师

教师同样作为本系统的使用者,能够完成与自身相关的功能,具体功能需求总结如下:

  1. 需要输入正确的账号密码登录整个系统;
  2. 能够完成密码等个人信息的修改;
  3. 能够查看个人当前需监考的考试信息;
  4. 能够查看当前所有时间状态等;
  5. 对有异议的考试可发送申请调换请求;
  6. 友好界面显示,提醒当前待监考场数;
  7. 收取邮件提醒监考任务等;

?数据流图:

? ? ? ? ??

相关界面展示:

管理员端:

教师端:

?

?部分Servlet代码:

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
?? ??? ?// TODO Auto-generated method stub?
?? ??? ?response.setContentType("text/html;charset=UTF-8");
?? ??? ?request.setCharacterEncoding("UTF-8");
?? ??? ?String url = request.getServletPath();
?? ??? ?if(url.equals("/a.Main"))
?? ??? ?{
?? ??? ??? ?/*String a = request.getParameter("username");
?? ??? ??? ?System.out.print(a);*/
?? ??? ??? ?String us = request.getParameter("username"); //从这开始,是为了登录所用的,并且判断是哪类人登录的,跳转到不同页面
?? ??? ??? ?String pw = request.getParameter("password");
?? ??? ??? ?String rad = request.getParameter("power");
?? ??? ??? ?if(us==null || pw==null || rad==null)
?? ??? ??? ?{
?? ??? ??? ??? ?PrintWriter out=response.getWriter();
?? ? ? ? ? ? ? ?out.print("<script language='javascript'>alert('孩子看看信息输入了吗');window.location.href='login.jsp';</script>");
?? ??? ??? ?}
?? ??? ??? ?else if(us!=null && pw!=null){
?? ??? ??? ??? ?if(rad.equals("admin")) ?
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?Admin admin = new Admin();
?? ??? ??? ??? ??? ?admin.setPassword(pw);
?? ??? ??? ??? ??? ?admin.setUsername(us);
?? ??? ??? ??? ??? ?//System.out.print(admin.getUsername());?
?? ??? ??? ??? ??? ?//System.out.print(admin.getPassword());
?? ??? ??? ??? ??? ?int r = admin.getPasswd();
?? ??? ??? ??? ??? ?if(r==1) {
//?? ??? ??? ??? ??? ??? ?int time = 3600;
//?? ??? ??? ??? ??? ??? ?Cookie c=new Cookie("user",us+"-"+pw);
//?? ??? ??? ??? ??? ??? ?c.setMaxAge(time);
//?? ??? ??? ??? ??? ??? ?response.addCookie(c);
?? ??? ??? ??? ??? ??? ?System.out.print("管理员,登录成功");
?? ??? ??? ??? ??? ??? ?request.getSession().setAttribute("name", us);
?? ??? ??? ??? ??? ??? ?request.getRequestDispatcher ("admin_1.jsp").forward (request, response);
?? ??? ??? ??? ??? ?}else if(r != 1) {
?? ??? ??? ??? ??? ??? ?PrintWriter out=response.getWriter();
?? ??? ??? ? ? ? ? ? ? ?out.print("<script language='javascript'>alert('孩子看看密码输对了吗');window.location.href='login.jsp';</script>");
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?}
?? ??? ??? ??? ?else if(rad.equals("teacher"))?
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?Teacher teacher = new Teacher();
?? ??? ??? ??? ??? ?teacher.setTid(us);
?? ??? ??? ??? ??? ?teacher.setTpassword(pw);
?? ??? ??? ??? ??? ?int r = teacher.tgetPasswd();
?? ??? ??? ??? ??? ?if(r == 1) {
?? ??? ??? ??? ??? ??? ?System.out.print("老师,登录成功");
?? ??? ??? ??? ??? ??? ?request.getSession().setAttribute("tname", us);
?? ??? ??? ??? ??? ??? ?request.getRequestDispatcher ("tea_1.jsp").forward (request, response);
?? ??? ??? ??? ??? ?}else if(r != 1) {
?? ??? ??? ??? ??? ??? ?PrintWriter out=response.getWriter();
?? ??? ??? ? ? ? ? ? ? ?out.print("<script language='javascript'>alert('孩子看看密码输对了吗');window.location.href='login.jsp';</script>");
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?}
?? ??? ??? ?}
?? ??? ?}
?? ??? ?
?? ??? ?if(url.equals("/b.Main")) //考试信息查询跳到这里来
?? ??? ?{
?? ??? ??? ?//Admin admin = new Admin();
?? ??? ??? ?//request.setAttribute("kaoshis", admin.getAllkaoshi());
?? ??? ??? ?Test test = new Test();
?? ??? ??? ?request.getSession().setAttribute("kaoshis", test.getAllkaoshi()); ? ? ? ??
?? ??? ??? ?request.getRequestDispatcher("admin_test.jsp").forward(request,response);
?? ??? ?}
?? ??? ?
?? ??? ?if(url.equals("/c.Main")) //考试信息删除跳到这里来
?? ??? ?{
?? ??? ??? ?Test test = new Test();
?? ??? ??? ?String x1 = request.getParameter("x1");
?? ??? ??? ?int c = Integer.parseInt(x1);
?? ??? ??? ?System.out.print(c);
?? ??? ??? ?test.setTest_id(c);
?? ??? ??? ?test.changeexamhouse(); //删除当前考试的话,需要把考场恢复成kong,表明以后可以用,加入有looktea的话,把looktea的老师弄成kong
?? ??? ??? ?int a = test.delkaoshi();
?? ??? ??? ?if(a==1)
?? ??? ??? ?{
?? ??? ??? ??? ?request.getSession().setAttribute("kaoshis", test.getAllkaoshi());?
?? ??? ??? ??? ?request.getRequestDispatcher("admin_test.jsp").forward(request,response);
?? ??? ??? ?}else {
?? ??? ??? ??? ?PrintWriter out=response.getWriter();
?? ? ? ? ? ? ? ?out.print("<script language='javascript'>alert('好像删除失败了呢');window.location.href='admin_test.jsp';</script>");
?? ??? ??? ?}
?? ??? ?}
?? ??? ?
?? ??? ?if(url.equals("/d.Main")) //考试信息修改跳到这里来
?? ??? ?{
?? ??? ??? ?response.setContentType("text/html;charset=UTF-8");
?? ??? ??? ?request.setCharacterEncoding("UTF-8");
?? ??? ??? ?Test test = new Test();
?? ??? ??? ?Teacher teacher = new Teacher();
?? ??? ??? ?String x =(String)request.getSession().getAttribute("oldlooktea");
?? ??? ??? ?String y =(String)request.getSession().getAttribute("oldlooktime");
?? ??? ??? ?String z =(String)request.getSession().getAttribute("oldposit");
?? ??? ??? ?teacher.dealold(x,y,1);
?? ??? ??? ?teacher.dealold(z,y,3);
?? ??? ??? ?String x1 = request.getParameter("id");
?? ??? ??? ?String x2 = request.getParameter("l_s_card");
?? ??? ??? ?String x3 = request.getParameter("s_subject");
?? ??? ??? ?String x4 = request.getParameter("k_time");
?? ??? ??? ?String x5 = request.getParameter("c_name");
?? ??? ??? ?String x6 = request.getParameter("tea");
?? ??? ??? ?String x7 = request.getParameter("s_position");
?? ??? ??? ?String x8 = request.getParameter("count");
?? ??? ??? ?String x9 = request.getParameter("looktea");
?? ??? ??? ?teacher.dealold(x9,y,2);
?? ??? ??? ?teacher.dealold(x7,y,4);
?? ??? ??? ?int c = Integer.parseInt(x1);
?? ??? ??? ?test.setTest_id(c);
?? ??? ??? ?test.setTest_leibie(x2);
?? ??? ??? ?test.setTest_subject(x3);
?? ??? ??? ?test.setTest_time(x4);
?? ??? ??? ?test.setTest_class(x5);
?? ??? ??? ?test.setTest_teacher(x6);
?? ??? ??? ?test.setTest_position(x7);
?? ??? ??? ?test.setTest_count(x8);
?? ??? ??? ?test.setLooktea(x9);
?? ??? ??? ?int a = test.updatekaoshi();
?? ??? ??? ?if(a==1)
?? ??? ??? ?{
?? ??? ??? ??? ?request.getSession().setAttribute("kaoshis", test.getAllkaoshi());?
?? ??? ??? ??? ?request.getRequestDispatcher("admin_test.jsp").forward(request,response);
?? ??? ??? ?}else {
?? ??? ??? ??? ?PrintWriter out=response.getWriter();
?? ? ? ? ? ? ? out.print("<script language='javascript'>alert('好像修改失败了呢');window.location.href='admin_test.jsp';</script>");
?? ??? ??? ?}
?? ??? ?}
?? ??? ?

?

?

  开发测试 最新文章
pytest系列——allure之生成测试报告(Wind
某大厂软件测试岗一面笔试题+二面问答题面试
iperf 学习笔记
关于Python中使用selenium八大定位方法
【软件测试】为什么提升不了?8年测试总结再
软件测试复习
PHP笔记-Smarty模板引擎的使用
C++Test使用入门
【Java】单元测试
Net core 3.x 获取客户端地址
上一篇文章      下一篇文章      查看所有文章
加:2021-07-14 23:15:03  更:2021-07-14 23:15:20 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/7 17:49:44-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码