论文无忧网提供:计算机毕业论文范文|计算机毕业设计|计算机毕业论文
栏目导航 ASP Java Web .NET VB6.0 JAVA VC VF DELPHI PB 计算机网络 计算机科学与技术 PHP 安卓APP 其他 C# 代写论文
当前位置: > 计算机 > Java Web >

JSP班级管理系统

目    录 http://www.paper51.com

摘   要... I http://www.paper51.com

Abstract II

http://www.paper51.com

第1章 引言... 1 内容来自论文无忧网 www.paper51.com

1.1 项目开发的背景... 1 内容来自www.paper51.com

1.2 项目开发的意义... 2 内容来自论文无忧网 www.paper51.com

第2章 可行性分析及总体设计原则... 3

http://www.paper51.com

2.1 可行性分析... 3

内容来自www.paper51.com

2.1.1. 技术可行性... 3

paper51.com

2.1.2 经济可行性... 7 内容来自论文无忧网 www.paper51.com

2.1.3 社会可行性... 7 paper51.com

2.2 总体设计原则... 8

http://www.paper51.com

第3章 系统分析... 9 内容来自www.paper51.com

3.1 业务流程分析... 9 paper51.com

3.2 数据流图... 10

内容来自www.paper51.com

3.3 数据字典... 13

内容来自论文无忧网 www.paper51.com

第4章 系统设计... 17

paper51.com

4.1 系统功能设计... 17 copyright paper51.com

4.2 系统数据库设计... 17 内容来自论文无忧网 www.paper51.com

4.2.1 概念结构设计... 18 paper51.com

4.2.2 数据库表设计... 22

http://www.paper51.com

4.3 系统开发工具与开发模式的选择... 25 内容来自论文无忧网 www.paper51.com

4.3.1 系统开发工具... 25 内容来自论文无忧网 www.paper51.com

4.3.2 系统设计模式... 28

http://www.paper51.com

第5章 系统实现... 31 内容来自www.paper51.com

5.1 教师登录模块... 31

http://www.paper51.com

5.1.1 查看系统属性... 31 内容来自www.paper51.com

5.1.2 成绩管理界面... 32

copyright paper51.com

5.1.3 考勤管理界面... 32

内容来自论文无忧网 www.paper51.com

5.1.4 回复留言界面... 33 内容来自www.paper51.com

5.2 管理员模块... 37 内容来自www.paper51.com

5.2.1 登录界面... 37

内容来自www.paper51.com

5.2.2 班级管理界面... 48

http://www.paper51.com

5.2.3 课程管理界面... 48 内容来自论文无忧网 www.paper51.com

5.2.4 添加教师信息界面... 48 paper51.com

5.2.5 学生管理界面... 60

copyright paper51.com

5.3 学生登录模块... 61

paper51.com

5.3.1 浏览成绩界面... 61 http://www.paper51.com

5.3.2 留言管理界面... 61

http://www.paper51.com

第6章 软件测试与分析... 69 内容来自www.paper51.com

6.1 软件测试的重要性... 69 内容来自www.paper51.com

6.2 测试实例的研究与选择... 70

paper51.com

6.3 测试环境与测试条件... 70

内容来自论文无忧网 www.paper51.com

6.4 系统运行情况... 71 内容来自www.paper51.com

6.5 系统评价... 71

内容来自www.paper51.com

结   论... 72 copyright paper51.com

参 考 文 献... 73

内容来自论文无忧网 www.paper51.com

致   谢... 74

paper51.com

附  录    75 paper51.com

内容来自论文无忧网 www.paper51.com

5.2 管理员模块5.2.1 登录界面 http://www.paper51.com

(1)登录模块

paper51.com

此模块主要功能是用于登录本系统,不同权限的用户登录本系统会进入不同的管理模块界面,因为在后台对该用户进行的判断,首先将从前台页面提交的用户名和密码进行接受,之后在后台进行处理,按照用户名在数据库中进行查询如果查到该用户则将该用户的权限和密码全都取出来分别赋给两个字符串变量,判断从数据库中读出的密码与登录时输入的密码是否配比上,若两个密码相同则根据权限的值进入相应的页面,否则输出密码错误。若用户未被管理员分配好权限那么也是无法登录本系统的。如下图所示:

内容来自www.paper51.com

http://www.paper51.com

图5-5登录界面 http://www.paper51.com

(2)程序流程 内容来自论文无忧网 www.paper51.com

内容来自www.paper51.com

图5-6登录程序流程图

copyright paper51.com

(2)主要代码(login_servlet.java) copyright paper51.com

package com.bjglxt.action;

内容来自论文无忧网 www.paper51.com

import java.io.IOException;

paper51.com

import java.sql.ResultSet;

内容来自www.paper51.com

import javax.servlet.RequestDispatcher;

http://www.paper51.com

import javax.servlet.ServletException;

内容来自论文无忧网 www.paper51.com

import javax.servlet.http.HttpServlet; 内容来自论文无忧网 www.paper51.com

import javax.servlet.http.HttpServletRequest; copyright paper51.com

import javax.servlet.http.HttpServletResponse; 内容来自论文无忧网 www.paper51.com

import com.bjglxt.dao.DB; 内容来自论文无忧网 www.paper51.com

import com.bjglxt.orm.Yonghu;

copyright paper51.com

import com.bjglxt.utils.Yhqx; http://www.paper51.com

public class login_servlet extends HttpServlet{ 内容来自www.paper51.com

      publicvoid service(HttpServletRequest req,HttpServletResponse res)throwsServletException, IOException 内容来自www.paper51.com

      {

内容来自www.paper51.com

       Stringtype=req.getParameter("type");

内容来自论文无忧网 www.paper51.com

      

内容来自论文无忧网 www.paper51.com

       if(type.endsWith("login"))

http://www.paper51.com

       { paper51.com

              intloginType = Integer.parseInt(req.getParameter("loginType")); paper51.com

              switch(loginType){

paper51.com

                     caseYhqx.GLY:   //管理员 内容来自www.paper51.com

                            glyLogin(req,res);

内容来自www.paper51.com

                            break; http://www.paper51.com

                     caseYhqx.JS:       //教师

内容来自www.paper51.com

                            jsLogin(req,res);

http://www.paper51.com

                            break;

copyright paper51.com

                     caseYhqx.XS:     //学生

内容来自论文无忧网 www.paper51.com

                            xsLogin(req,res); 内容来自www.paper51.com

                            break;

内容来自论文无忧网 www.paper51.com

                     default:break; 内容来自论文无忧网 www.paper51.com

              } 内容来自论文无忧网 www.paper51.com

       } copyright paper51.com

       if(type.endsWith("userpw")) paper51.com

       {

内容来自www.paper51.com

              userpw(req,res);

paper51.com

       } paper51.com

      

内容来自论文无忧网 www.paper51.com

      }

内容来自www.paper51.com

      内容来自论文无忧网 www.paper51.com

      publicvoid userpw(HttpServletRequest req,HttpServletResponse res){

paper51.com

       StringoldPass = req.getParameter("userPw");

内容来自www.paper51.com

       Stringnewpass = req.getParameter("userPw1");

http://www.paper51.com

      

copyright paper51.com

       Yonghuyonghu = (Yonghu) req.getSession().getAttribute("userinfo");

paper51.com

       内容来自www.paper51.com

       if(oldPass.equals(yonghu.getLoginPw())){

copyright paper51.com

              intid = yonghu.getId(); 内容来自论文无忧网 www.paper51.com

              intqx = yonghu.getQx();

内容来自www.paper51.com

              Stringsql=""; copyright paper51.com

              if(Yhqx.XS==qx){

内容来自www.paper51.com

                     //学生密码修改 paper51.com

                     sql= "update t_xuesheng set loginPw='"+newpass+"' whereid="+id;

http://www.paper51.com

              }elseif(Yhqx.JS==qx){

paper51.com

                     //教师密码修改 paper51.com

                     sql= "update t_jiaoshi set loginPw='"+newpass+"' whereid="+id;

内容来自论文无忧网 www.paper51.com

              }elseif(Yhqx.GLY==qx){

内容来自www.paper51.com

                     //管理员密码修改

copyright paper51.com

                     sql= "update t_admin set userPw='"+newpass+"' whereuserId="+id; paper51.com

              }

http://www.paper51.com

              内容来自www.paper51.com

              Object[]params={}; 内容来自论文无忧网 www.paper51.com

              DBmydb=new DB();

http://www.paper51.com

              mydb.doUpdate(sql,params); copyright paper51.com

              mydb.closed(); copyright paper51.com

              paper51.com

              req.setAttribute("message","操作成功!"); http://www.paper51.com

              req.setAttribute("path","userPw.jsp");

内容来自www.paper51.com

              yonghu.setLoginPw(newpass); http://www.paper51.com

              req.getSession().setAttribute("userinfo",yonghu); http://www.paper51.com

             String targetURL = "/success.jsp"; 内容来自www.paper51.com

              dispatch(targetURL,req, res);

http://www.paper51.com

       }else{ 内容来自www.paper51.com

              req.setAttribute("message","旧密码错误!"); copyright paper51.com

              req.setAttribute("path","userPw.jsp"); 内容来自www.paper51.com

             

copyright paper51.com

             String targetURL = "/success.jsp";

内容来自www.paper51.com

              dispatch(targetURL,req, res);

内容来自论文无忧网 www.paper51.com

       }

内容来自论文无忧网 www.paper51.com

      }

http://www.paper51.com

      publicvoid glyLogin(HttpServletRequest req,HttpServletResponse res){ http://www.paper51.com

       StringloginName = req.getParameter("loginName");

http://www.paper51.com

       StringloginPw = req.getParameter("loginPw");

内容来自论文无忧网 www.paper51.com

       Stringsql = "select userId from t_admin where userName=? and userPw=?";

内容来自论文无忧网 www.paper51.com

       copyright paper51.com

       Object[]params={loginName,loginPw}; paper51.com

       DBmydb=new DB();

内容来自www.paper51.com

       try

内容来自www.paper51.com

       { 内容来自www.paper51.com

              mydb.doPstm(sql,params); 内容来自论文无忧网 www.paper51.com

              ResultSetrs=mydb.getRs(); 内容来自www.paper51.com

              if(rs.next())

内容来自论文无忧网 www.paper51.com

              { http://www.paper51.com

                     Yonghuyonghu=new Yonghu(); 内容来自www.paper51.com

                     yonghu.setId(rs.getInt("userId"));

http://www.paper51.com

                     yonghu.setName("管理员");

paper51.com

                     yonghu.setLoginName(loginName);

http://www.paper51.com

                     yonghu.setLoginPw(loginPw); 内容来自www.paper51.com

                     yonghu.setQx(Yhqx.GLY);

内容来自论文无忧网 www.paper51.com

                     copyright paper51.com

                     rs.close(); 内容来自论文无忧网 www.paper51.com

                     mydb.closed();

http://www.paper51.com

                    

paper51.com

                     req.getSession().setAttribute("userinfo",yonghu); paper51.com

                     req.getRequestDispatcher("/index.jsp").forward(req,res); 内容来自www.paper51.com

              }else{

内容来自论文无忧网 www.paper51.com

                     req.setAttribute("message","用户名或密码错误!"); paper51.com

                     req.setAttribute("path","login.jsp");

paper51.com

                     内容来自论文无忧网 www.paper51.com

              String targetURL = "/success.jsp";

copyright paper51.com

                     dispatch(targetURL,req, res);

内容来自论文无忧网 www.paper51.com

              } paper51.com

             

内容来自www.paper51.com

       }

内容来自www.paper51.com

       catch(Exceptione)

内容来自论文无忧网 www.paper51.com

       {

paper51.com

              e.printStackTrace(); 内容来自论文无忧网 www.paper51.com

       }

http://www.paper51.com

      }

paper51.com

      publicvoid jsLogin(HttpServletRequest req,HttpServletResponse res){

copyright paper51.com

       StringloginName = req.getParameter("loginName"); http://www.paper51.com

       StringloginPw = req.getParameter("loginPw");

http://www.paper51.com

       paper51.com

       Stringsql = "select id,jsxm from t_jiaoshi where loginName=? and loginPw=? and del=?"; paper51.com

      

copyright paper51.com

       Object[]params={loginName,loginPw,0};

内容来自www.paper51.com

       DBmydb=new DB();

内容来自www.paper51.com

       try

http://www.paper51.com

       { 内容来自www.paper51.com

              mydb.doPstm(sql,params);

内容来自www.paper51.com

              ResultSetrs=mydb.getRs();

http://www.paper51.com

              if(rs.next())

copyright paper51.com

              { 内容来自论文无忧网 www.paper51.com

                     Yonghuyonghu=new Yonghu(); paper51.com

                     yonghu.setId(rs.getInt("id"));

paper51.com

                     yonghu.setName(rs.getString("jsxm")); copyright paper51.com

                     yonghu.setLoginName(loginName); 内容来自论文无忧网 www.paper51.com

                     yonghu.setLoginPw(loginPw); paper51.com

                     yonghu.setQx(Yhqx.JS);

copyright paper51.com

                     copyright paper51.com

                     rs.close(); 内容来自论文无忧网 www.paper51.com

                     mydb.closed();

paper51.com

                     http://www.paper51.com

                     req.getSession().setAttribute("userinfo",yonghu);

copyright paper51.com

                     req.getRequestDispatcher("/index.jsp").forward(req,res);

内容来自论文无忧网 www.paper51.com

              }else{ 内容来自www.paper51.com

                     req.setAttribute("message","用户名或密码错误!");

http://www.paper51.com

                     req.setAttribute("path","login.jsp");

内容来自论文无忧网 www.paper51.com

                     内容来自论文无忧网 www.paper51.com

              String targetURL = "/success.jsp";

copyright paper51.com

                     dispatch(targetURL,req, res);

内容来自论文无忧网 www.paper51.com

              }

paper51.com

             

copyright paper51.com

       }

http://www.paper51.com

       catch(Exceptione)

copyright paper51.com

       {

http://www.paper51.com

              e.printStackTrace(); http://www.paper51.com

       }

内容来自www.paper51.com

      }

内容来自论文无忧网 www.paper51.com

   

copyright paper51.com

------分隔线----------------------------
联系方式