精华内容
下载资源
问答
  • 学生信息管理系统模板,全套模板,DIV+CSS布局,清新简约。有个人中心、我的信息、班级信息、短信息、学院通知、我的异议、教务中心、我的报考、我的成绩、我的书籍、学习中心、资料下载、学习历程、财务中心、我的...
  • 此项目为实操项目简化版,包含html静态页面,JS,CSS,能实现网站模板基本要求
  • 学生就业管理系统后台模板,DIV+CSS布局,全套模板,包括登录、个人信息、家庭信息、学校信息、学籍信息、处分信息、档案信息、就业信息、就业调查、考研信息、修改密码等HTML后台模板页面。 下载地址: ...

    在这里插入图片描述
    学生就业管理系统后台模板,DIV+CSS布局,全套模板,包括登录、个人信息、家庭信息、学校信息、学籍信息、处分信息、档案信息、就业信息、就业调查、考研信息、修改密码等HTML后台模板页面。


    下载地址:

    http://www.bytepan.com/XoWUZXletqk

    展开全文
  • 简单java web学生信息管理系统java2020-6-16下载地址https://www.codedown123.com/25993.html本人是新手,也刚开始java web的学习,就在网上找了个例子练手,是一个简单的jsp+servler的学生管理系统。网址:...

    简单java web学生信息管理系统

    java

    2020-6-16

    下载地址

    https://www.codedown123.com/25993.html

    本人是新手,也刚开始java web的学习,就在网上找了个例子练手,是一个简单的jsp+servler的学生管理系统。网址:http://www.javazhijia.com/ym/web/193.html导入到eclipse有点报错,我自己做了一点修改,将oracle数据库换成了数据库连接池连接mysql数据库,可直接运行,希望对大家能有所帮助!

    资源下载此资源下载价格为2D币,请先登录

    资源文件列表

    studentManager/student2.sql , 189

    studentManager/StudentManager/.classpath , 1045

    studentManager/StudentManager/.project , 1047

    studentManager/StudentManager/.settings/.jsdtscope , 517

    studentManager/StudentManager/.settings/org.eclipse.jdt.core.prefs , 364

    studentManager/StudentManager/.settings/org.eclipse.wst.common.component , 474

    studentManager/StudentManager/.settings/org.eclipse.wst.common.project.facet.core.xml , 305

    studentManager/StudentManager/.settings/org.eclipse.wst.jsdt.ui.superType.container , 49

    studentManager/StudentManager/.settings/org.eclipse.wst.jsdt.ui.superType.name , 6

    studentManager/StudentManager/build/classes/com/dw/controll/AddServlet.class , 2545

    studentManager/StudentManager/build/classes/com/dw/controll/DeleteServlet.class , 1919

    studentManager/StudentManager/build/classes/com/dw/controll/LoginServlet.class , 4140

    studentManager/StudentManager/build/classes/com/dw/controll/PreServlet.class , 3552

    studentManager/StudentManager/build/classes/com/dw/controll/SearchByIdServlet.class , 1741

    studentManager/StudentManager/build/classes/com/dw/controll/ShowAllServlet.class , 1583

    studentManager/StudentManager/build/classes/com/dw/controll/UpdateServlet.class , 2348

    studentManager/StudentManager/build/classes/com/dw/dao/impl/StudentDaoImpl.class , 5130

    studentManager/StudentManager/build/classes/com/dw/dao/impl/UserDaoImpl.class , 1929

    studentManager/StudentManager/build/classes/com/dw/dao/StudentDao.class , 378

    studentManager/StudentManager/build/classes/com/dw/dao/UserDao.class , 203

    studentManager/StudentManager/build/classes/com/dw/filter/EncodingFilter.class , 1447

    studentManager/StudentManager/build/classes/com/dw/model/Student.class , 2758

    studentManager/StudentManager/build/classes/com/dw/model/User.class , 1061

    studentManager/StudentManager/build/classes/com/dw/util/DbConn.class , 1132

    studentManager/StudentManager/build/classes/com/dw/util/StringUtil.class , 621

    studentManager/StudentManager/build/classes/com/mimi/dataSource/BasicDataSourceListener.class , 2101

    studentManager/StudentManager/build/classes/com/mimi/dataSource/datasource.properties , 53

    studentManager/StudentManager/build/classes/com/mimi/dataSource/DataSourceConfig.class , 1286

    studentManager/StudentManager/build/classes/com/mimi/dataSource/DataSourceProvider.class , 856

    studentManager/StudentManager/src/com/dw/controll/AddServlet.java , 1675

    studentManager/StudentManager/src/com/dw/controll/DeleteServlet.java , 1258

    studentManager/StudentManager/src/com/dw/controll/LoginServlet.java , 3320

    studentManager/StudentManager/src/com/dw/controll/PreServlet.java , 3855

    studentManager/StudentManager/src/com/dw/controll/SearchByIdServlet.java , 2027

    studentManager/StudentManager/src/com/dw/controll/ShowAllServlet.java , 1194

    studentManager/StudentManager/src/com/dw/controll/UpdateServlet.java , 1587

    studentManager/StudentManager/src/com/dw/dao/impl/StudentDaoImpl.java , 5314

    studentManager/StudentManager/src/com/dw/dao/impl/UserDaoImpl.java , 1793

    studentManager/StudentManager/src/com/dw/dao/StudentDao.java , 1036

    studentManager/StudentManager/src/com/dw/dao/UserDao.java , 404

    studentManager/StudentManager/src/com/dw/filter/EncodingFilter.java , 1150

    studentManager/StudentManager/src/com/dw/model/Student.java , 2077

    studentManager/StudentManager/src/com/dw/model/User.java , 714

    studentManager/StudentManager/src/com/dw/util/DbConn.java , 767

    studentManager/StudentManager/src/com/dw/util/StringUtil.java , 385

    studentManager/StudentManager/src/com/mimi/dataSource/BasicDataSourceListener.java , 1880

    studentManager/StudentManager/src/com/mimi/dataSource/datasource.properties , 53

    studentManager/StudentManager/src/com/mimi/dataSource/DataSourceConfig.java , 702

    studentManager/StudentManager/src/com/mimi/dataSource/DataSourceProvider.java , 551

    studentManager/StudentManager/WebContent/bootstrap/css/bootstrap-responsive.css , 22102

    studentManager/StudentManager/WebContent/bootstrap/css/bootstrap-responsive.min.css , 16840

    studentManager/StudentManager/WebContent/bootstrap/css/bootstrap.css , 127343

    studentManager/StudentManager/WebContent/bootstrap/css/bootstrap.min.css , 106006

    studentManager/StudentManager/WebContent/bootstrap/img/glyphicons-halflings-white.png , 8777

    studentManager/StudentManager/WebContent/bootstrap/img/glyphicons-halflings.png , 12799

    studentManager/StudentManager/WebContent/bootstrap/js/bootstrap.js , 61884

    studentManager/StudentManager/WebContent/bootstrap/js/bootstrap.min.js , 28631

    studentManager/StudentManager/WebContent/bootstrap/js/jQuery.js , 92633

    studentManager/StudentManager/WebContent/common/default.jsp , 233

    studentManager/StudentManager/WebContent/common/head.jsp , 1580

    studentManager/StudentManager/WebContent/db.properties , 96

    studentManager/StudentManager/WebContent/displaystudent.jsp , 2883

    studentManager/StudentManager/WebContent/image.jsp , 1509

    studentManager/StudentManager/WebContent/images/error.png , 625

    studentManager/StudentManager/WebContent/images/logo.png , 9551

    studentManager/StudentManager/WebContent/index.jsp , 375

    studentManager/StudentManager/WebContent/jquery/jquery-1.5.1.js , 216841

    studentManager/StudentManager/WebContent/js/login.js , 3202

    studentManager/StudentManager/WebContent/js/updatepassword.js , 3175

    studentManager/StudentManager/WebContent/login.jsp , 5279

    studentManager/StudentManager/WebContent/logout.jsp , 335

    studentManager/StudentManager/WebContent/main.jsp , 2288

    studentManager/StudentManager/WebContent/META-INF/context.xml , 1713

    studentManager/StudentManager/WebContent/META-INF/MANIFEST.MF , 39

    studentManager/StudentManager/WebContent/showstudent.jsp , 2443

    studentManager/StudentManager/WebContent/studentAdd.jsp , 3959

    studentManager/StudentManager/WebContent/studentUpdate.jsp , 3409

    studentManager/StudentManager/WebContent/updatepwd.jsp , 2510

    studentManager/StudentManager/WebContent/updatepwdSuccess.jsp , 464

    studentManager/StudentManager/WebContent/WEB-INF/lib/jstl.jar , 20682

    studentManager/StudentManager/WebContent/WEB-INF/lib/mysql-connector-java-5.1.35-bin.jar , 968670

    studentManager/StudentManager/WebContent/WEB-INF/lib/servlet-api.jar , 88209

    studentManager/StudentManager/WebContent/WEB-INF/lib/standard.jar , 393259

    studentManager/StudentManager/WebContent/WEB-INF/tld/c.tld , 15967

    studentManager/StudentManager/WebContent/WEB-INF/web.xml , 3261

    studentManager/t_manager.sql , 101

    展开全文
  • 1.团队课程设计博客链接 http://www.cnblogs.com/Min21/p/7064093.html 2.个人负责模板或任务说明 设计登陆界面和学生信息界面...(1)需要管理学生信息有:学号、姓名、性别、出生日期、政治面貌、家庭住址、电话...

    1.团队课程设计博客链接

    http://www.cnblogs.com/Min21/p/7064093.html

    2.个人负责模板或任务说明

    设计登陆界面和学生信息界面的设计,学生信息的显示、退出等功能。

    3.自己的代码提交记录截图

    1109705-20170622110200570-2064488882.png

    4.自己负责模块或任务详细说明

    (一)总体设计(概要设计)

    系统主要功能
    (1)需要管理的学生信息有:学号、姓名、性别、出生日期、政治面貌、家庭住址、电话、宿舍号。
    (2)点清空按钮,数据将会清空。实际上它的作用就是清空输入栏。方便再往里面加入数据。
    (3)查看功能:首先输入要查看的学号,点查看,信息将会显示在输入栏中。如果学号不存在,下面会有提示。
    (4)修改功能:为了防止误修改,首先要查看,才能修改,查看后直接改输入栏中的数据,点击修改,既修改成功。
    (5)删除功能:先输入要删除的学号,点删除,该学生的信息将被移除,在查看该学号,将不存在。
    (6)显示功能:你输入的数据通过序列化保存在一个文档里,点击显示, 会跳出一个窗口,能把它们全部显示出来。
    (7)系统退出:其实就是退出登录状态,返回登录界面。可以再重新登录。
    数据存储:文件。

    流程图:
    1109705-20170622110437007-136902927.png

    (二)本人负责的主要功能展示与代码分析

    (1)学生登陆界面。
    程序运行显示的第一个界面。输入用户名和密码就可以进入管理界面。
    用户名:admin
    密码:admin
    1109705-20170622110520101-1360458531.png

    用户名或密码错误会报错:
    1109705-20170622110531804-1966612285.png

    重置用于清空输入栏

    主要代码:

    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    
    class LoginCheck{
        private String name;
        private String password;
        public LoginCheck(String name,String password){
            this.name=name;
            this.password=password;
        }
        public boolean equals(){
            if("admin".equals(name)&&"admin".equals(password)){
                return true;
            }else{
                return false;
            }
        }
    };
    class ActionHandle{
        private JFrame frame=new JFrame("学生信息管理系统");
        private JTextField name=new JTextField();//设置文本框
        private JPasswordField pass=new JPasswordField();
        private JLabel but1=new JLabel("用户名:");
        private JLabel but2=new JLabel("密   码:");
        private JButton but3=new JButton("登陆");
        private JButton but4=new JButton("重置");
        
        public ActionHandle(){
            but3.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e){
                    if(e.getSource()==but3){
                        String sname=name.getText();
                        String spass=new String(pass.getPassword());
                        LoginCheck log=new LoginCheck(sname,spass);
                        if(log.equals()){
                            try {
                                new Menu();
                            } catch (Exception e1) {
                                
                                e1.printStackTrace();
                            }
                            frame.setVisible(false);
                            
                        }else{
                            JOptionPane.showMessageDialog(null, "登录失败,错误的用户名或密码!");
                        }
                    }
                }                   
            });     
            but4.addActionListener(
    new ActionListener(){
                public void actionPerformed(ActionEvent e){
                    if(e.getSource()==but4){
                        name.setText("");
                        pass.setText("");
                    }
                }
    
            });
            frame.setLayout(null);
            but1.setBounds(80, 40 , 80,30);
            name.setBounds(140,40, 120, 30);    //
            but2.setBounds(80, 80 , 80,30);
            pass.setBounds(140,80, 120, 30);
            but3.setBounds(100, 150 , 60,30);
            but4.setBounds(180, 150 , 60,30);
            frame.setSize(400,330);     
            frame.setLocation(300, 200);
            frame.add(but1);
            frame.add(name);
            frame.add(pass);
            frame.add(but2);
            frame.add(but3);
            frame.add(but4);
            frame.setVisible(true);
        }
    }
    public class  Enter{
        public static void main(String[] args) {
            
            new ActionHandle();
        }
    
    }

    (2)学生信息的显示、退出。

    当输入学生信息后,信息保存到文件中,之后点击显示按钮,即可得到
    如下图:
    1109705-20170622110627632-709276497.png
    1109705-20170622110647226-962779188.png

    代码展示:

    package Student;
    
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    public class Menu {
        private JButton but1 = new JButton("增加数据"); // 按钮
        private JButton but2 = new JButton("删除数据");
        private JButton but3 = new JButton("修改数据");
        private JButton but4 = new JButton("查看数据");
        private JButton but0 = new JButton("系统退出");
        private JButton but5 = new JButton("显示");
        private JButton clear = new JButton("清空");
        private JTextField number = new JTextField();// 文本框
        private JTextField name = new JTextField();
        private JTextField dor = new JTextField();
        private JTextField address = new JTextField();
        private JTextField sex = new JTextField();
        private JTextField date = new JTextField();
        private JTextField pol = new JTextField();
        private JTextField phone = new JTextField();
    
        private JTextArea show = new JTextArea(16, 30); 
        private JLabel lab1 = new JLabel("姓名:");// 标签
        private JLabel lab2 = new JLabel("宿舍号:");
        private JLabel num = new JLabel("学号:");
        private JLabel lab4 = new JLabel("家庭住址:");
        private JLabel lab5 = new JLabel("性别:");
        private JLabel lab6 = new JLabel("出生日期:");
        private JLabel lab7 = new JLabel("政治面貌:");
        private JLabel lab8 = new JLabel("电话:");
        // private JLabel lab3 = new JLabel("请输入内容,完成操作。");
    
        private JFrame frame = new JFrame("信息管理系统"); // 框架
        private JFrame frame1 = new JFrame("显示信息");
    
        Hashtable<String, Person> has = new Hashtable<String, Person>();// 哈希表,加密,文件乱码    
        File file = new File("学生信息.txt");// 新建一个文件
        public Menu() {
            if (!file.exists()) {
                try {
                    ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file));// 把一个实例的对象以文件的形式保存到磁盘上。        out.writeObject(has);
                    out.close();
                } catch (IOException e) {
                }
            }
            but5.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if (e.getSource() == but5) {
                        frame1.setVisible(true);
                        try {
                            ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
                            has = (Hashtable) in.readObject();
                            in.close();
                        } catch (Exception ee) {
                        }
                        if (has.isEmpty()) {
                            show.append("目前还没有学生的信息记录!\n");
    // append(s:String)向文本域的文本追加字符串,简单的说就像system.out.println()                  
    } else {
                                                
                        for (Enumeration enu = has.elements(); enu.hasMoreElements();) {
    //存入内存的内容如果不经过遍历是显示不出来的
                                Person per = (Person) enu.nextElement();
                                String str = "  <学号>:" + per.getNum() + "\n" + "  <姓名>:" + per.getName() + "\n" + "  <宿舍号>:"
                                        + per.getDor() + "\n" + "  <家庭住址>:" + per.getAddress() + "\n" + "  <性别>:"
                                        + per.getSex() + "\n" + "<出生日期>:" + per.getDate() + "\n" + "  <政治面貌>:"
                                        + per.getPol() + "\n" + " <电话>:" + per.getPhone() + "\n" + "\n";
                                show.append(str);
                            }
                            String str2 = "------------------------------结束---------------------------------------------------"
                                    + "\n";
                            show.append(str2);
                        }
                    }
                }
    
            });
            but0.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if (e.getSource() == but0) {
                        frame.setVisible(false);
                        new ActionHandle();
                    }
                }
            });
            frame.setLayout(null);
            but1.setBounds(30, 35, 90, 25);
            but2.setBounds(30, 75, 90, 25);
            but3.setBounds(30, 115, 90, 25);
            but4.setBounds(30, 155, 90, 25);
            but0.setBounds(240, 430, 100, 25); // setBounds(x,y,width,height);
            num.setBounds(150, 30, 70, 25);
            lab1.setBounds(150, 65, 70, 25);
            lab2.setBounds(150, 100, 70, 25);//
            lab4.setBounds(150, 135, 70, 25);
            lab5.setBounds(150, 170, 70, 25);
            lab6.setBounds(150, 205, 70, 25);
            lab7.setBounds(150, 240, 70, 25);
            lab8.setBounds(150, 275, 70, 25);
            number.setBounds(230, 30, 90, 25);
            name.setBounds(230, 65, 90, 25);
            dor.setBounds(230, 100, 90, 25);
            address.setBounds(230, 135, 90, 25);
            sex.setBounds(230, 170, 90, 25);
            date.setBounds(230, 205, 90, 25);
            pol.setBounds(230, 240, 90, 25);
            phone.setBounds(230, 275, 90, 25);
            // lab3.setBounds(130, 390, 250, 25);
            clear.setBounds(250, 310, 60, 25);
            but5.setBounds(150, 310, 60, 25);
            frame.add(lab1);
            frame.add(lab2);
            //frame.add(lab3);
            frame.add(lab4);
            frame.add(lab5);
            frame.add(lab6);
            frame.add(lab7);
            frame.add(lab8);
            frame.add(num);
            frame.add(number);
            frame.add(name);
            frame.add(dor);
            frame.add(address);
            frame.add(sex);
            frame.add(date);
            frame.add(pol);
            frame.add(phone);
            frame.add(clear);
            frame.add(but1);
            frame.add(but2);
            frame.add(but3);
            frame.add(but4);
            frame.add(but0);
            JScrollPane scroll = new JScrollPane(show);
                frame1.add(scroll,BorderLayout.CENTER);      
    frame.add(but5);
            frame.setSize(400, 500); // 页面大小
            frame1.setBounds(200, 200, 400, 300);
            frame.setLocation(300, 200);
            frame.setVisible(true);
            frame1.setVisible(false);
        }
    }

    5.课程设计感想

    1.功能比较齐全,增删改查都有,虽然GUI设计得比较简陋。
    2.需要完善添加统计学生各门科目成绩,班级平均分等。

    转载于:https://www.cnblogs.com/Min21/p/7063877.html

    展开全文
  • 建立信息化的学籍信息管理系统,是提高教育管理水平的基础性工作,是加强和规范中小学学籍管理的有效途径,是各级政府教育督导的一项重要工作内容,本系统是协助学校新学期录取新生补建注册学籍,更新完善学生基础...
  • 开发工具:Eclipse 前端技术: 基础:html+css+JavaScript 框架:JQuery+H-ui 后端技术:Spring+SpringMVC+mybatis 模板引擎:JSP 数据库:mysql 5.7.27 ...(2)教师可以对学生信息、教师个人信息、课程信息

    开发工具:Eclipse
    前端技术
    基础:html+css+JavaScript
    框架:JQuery+H-ui
    后端技术:Spring+SpringMVC+mybatis
    模板引擎:JSP
    数据库:mysql 5.7.27
    jdk版本:1.8.0_251
    tomcat版本:Tomcat 9.0
    数据库连接池:druid

    一、功能概述

    学生管理系统的用户包括学生、教师及管理员。
    (1)学生可以对个人的各科成绩进行查询、个人信息修改、选课、修改登录密码等操作。
    (2)教师可以对学生信息、教师个人信息、课程信息、成绩等进行管理,实现对这些信息的查询、录入、添加、修改、删除等操作。
    (3)管理员可以对学生、教师、课程、成绩信息进行管理,实现对这些信息的查询、录入、添加、修改、删除以及权限管理等操作。
    功能结构图:
    在这里插入图片描述

    二、数据库表结构

    成绩表(Score):
    在这里插入图片描述
    学生表(student):
    在这里插入图片描述
    课程表(subject):
    在这里插入图片描述
    教师表(teacher):
    在这里插入图片描述
    用户表(user):
    在这里插入图片描述

    三、项目结构

    在这里插入图片描述

    四、配置SSM文件

    Spring-context.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"  
    	xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation="
    		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
    		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
    		http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
    		http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
    		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
    		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd
    		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd"
    	default-lazy-init="true">
    
    	<description>Spring Configuration</description>
    	
        <!-- 加载配置属性文件 -->
    	<context:property-placeholder ignore-unresolvable="true" location="classpath:demo.properties" />
    	
    	<!-- 使用Annotation自动注册Bean,解决事物失效问题:在主容器中不扫描@Controller注解,在SpringMvc中只扫描@Controller注解。  -->
    	<context:component-scan base-package="com.stusystem.controller"><!-- base-package 如果多个,用“,”分隔 -->
    		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    	</context:component-scan>
    	
     	<!-- MyBatis begin -->
        <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
            <property name="dataSource" ref="dataSource"/>
            <property name="typeAliasesPackage" value="com.stusystem.entity"/>
            <property name="mapperLocations" value="classpath:/com/stusystem/mappings/**/*.xml"/>
    		<property name="configLocation" value="classpath:/mybatis-config.xml"></property>
        </bean>
        
        <!-- 扫描basePackage下所有以@MyBatisDao注解的接口 -->
        <bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
            <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
            <property name="basePackage" value="com.stusystem.dao"/>
        </bean>
        
        <!-- 定义事务,用@Transactiona注解表示事物 -->
    	<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="dataSource" />
    	</bean>
    	
    	<!-- 配置 Annotation 驱动,扫描@Transactional注解的类定义事务  -->
    	<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
        <!-- MyBatis end -->
        
    	<!-- 配置 JSR303 Bean Validator 定义 -->
    	<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
    	
    	<!-- 数据源配置, 使用 BoneCP 数据库连接池 -->
    	<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> 
    	    <!-- 数据源驱动类可不写,Druid默认会自动根据URL识别DriverClass -->
    	    <property name="driverClassName" value="${jdbc.driver}" />
    	    
    		<!-- 基本属性 url、user、password -->
    		<property name="url" value="${jdbc.url}" />
    		<property name="username" value="${jdbc.username}" />
    		<property name="password" value="${jdbc.password}" />
    		
    		<!-- 配置初始化大小、最小、最大 -->
    		<property name="initialSize" value="${jdbc.pool.init}" />
    		<property name="minIdle" value="${jdbc.pool.minIdle}" /> 
    		<property name="maxActive" value="${jdbc.pool.maxActive}" />
    		
    		<!-- 配置获取连接等待超时的时间 -->
    		<property name="maxWait" value="60000" />
    		
    		<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
    		<property name="timeBetweenEvictionRunsMillis" value="60000" />
    		
    		<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
    		<property name="minEvictableIdleTimeMillis" value="300000" />
    		
    		<property name="validationQuery" value="${jdbc.testSql}" />
    		<property name="testWhileIdle" value="true" />
    		<property name="testOnBorrow" value="false" />
    		<property name="testOnReturn" value="false" />
    		
    		<!-- 配置监控统计拦截的filters -->
    	    <property name="filters" value="stat" /> 
    	</bean>
    	
    </beans>
    

    Mybatis-config.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
    <configuration>
    
    	<!-- 全局参数 -->
    	<settings>
    		<!-- 使全局的映射器启用或禁用缓存。 -->
    		<setting name="cacheEnabled" value="true"/>
    		
    		<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 -->
    		<setting name="lazyLoadingEnabled" value="true"/>
    		
    		<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 -->
    		<setting name="aggressiveLazyLoading" value="true"/>
    		
    		<!-- 是否允许单条sql 返回多个数据集  (取决于驱动的兼容性) default:true -->
    		<setting name="multipleResultSetsEnabled" value="true"/>
    		
    		<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true -->
    		<setting name="useColumnLabel" value="true"/>
    		
    		<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true,这个设置将强制使用被生成的主键,有一些驱动器不兼容不过仍然可以执行。  default:false  -->
    		<setting name="useGeneratedKeys" value="false"/>
    		
    		<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE:不隐射 PARTIAL:部分  FULL:全部  -->  
    		<setting name="autoMappingBehavior" value="PARTIAL"/>
    		
    		<!-- 这是默认的执行类型  (SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句;BATCH: 执行器可以重复执行语句和批量更新)  -->
    		<setting name="defaultExecutorType" value="SIMPLE"/>
    		
    		<!-- 使用驼峰命名法转换字段。 -->
    		<setting name="mapUnderscoreToCamelCase" value="true"/>
    		
    		<!-- 设置本地缓存范围 session:就会有数据的共享  statement:语句范围 (这样就不会有数据的共享 ) defalut:session -->
            <setting name="localCacheScope" value="SESSION"/>
    		
            <!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 -->
            <setting name="jdbcTypeForNull" value="NULL"/>
    		
    	</settings>
    	
    </configuration>
    

    spring-mvc.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
    		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
    		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
        
        <description>Spring MVC Configuration</description>
        
        <!-- 加载配置属性文件 -->
    	<context:property-placeholder ignore-unresolvable="true" location="classpath:demo.properties" />
    	
    	<!-- 使用Annotation自动注册Bean,只扫描@Controller -->
    	<context:component-scan base-package="com.stusystem" use-default-filters="false"><!-- base-package 如果多个,用“,”分隔 -->
    		<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
    	</context:component-scan>
        
    	<!-- 默认的注解映射的支持,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping -->
    	<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager">
    		<mvc:message-converters register-defaults="true">
    			<!-- 将StringHttpMessageConverter的默认编码设为UTF-8 -->
    			<bean class="org.springframework.http.converter.StringHttpMessageConverter">
    		    	<constructor-arg value="UTF-8" />
    			</bean>
    		</mvc:message-converters>
    	</mvc:annotation-driven>
    	
        <!-- REST中根据URL后缀自动判定Content-Type及相应的View -->
    	<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
    	    <property name="mediaTypes" >
    	        <map> 
                    <entry key="xml" value="application/xml"/> 
                    <entry key="json" value="application/json"/> 
                </map>
    	    </property>
            <property name="ignoreAcceptHeader" value="true"/>
            <property name="favorPathExtension" value="true"/>
    	</bean>
    	
    	<!-- 定义视图文件解析 -->
    	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    		<property name="prefix" value="/"/>
    		<!--  <property name="suffix" value="${web.view.suffix}"/> -->
    		<property name="suffix" value=".jsp"/>
    	</bean>
    	
    	<!-- 对静态资源文件的访问, 将无法mapping到Controller的path交给default servlet handler处理 -->
    	<mvc:default-servlet-handler />
    	
    	<!-- 静态资源映射 -->
    	<mvc:resources mapping="/static/**" location="/static/" cache-period="31536000"/>
    	
    	<!-- 定义无Controller的path<->view直接映射 -->
    	<mvc:view-controller path="/" view-name="redirect:${web.view.index}"/>
    	
    		<mvc:interceptors>
    			<!--多个拦截器,顺序执行 -->
    			<!-- 登陆认证拦截器 -->
    			<mvc:interceptor>
    				<mvc:mapping path="/**"/>
    				<bean class="com.stusystem.interceptor.LoginInterceptor"></bean>
    			</mvc:interceptor>
    		</mvc:interceptors>
    </beans>
    

    五、配置web.xml和demo.properties

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns="http://java.sun.com/xml/ns/javaee"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    	id="WebApp_ID" version="3.0">
    	<display-name>stusystem_3</display-name>
    	
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>classpath*:/spring-context*.xml</param-value>
    	</context-param>
    	
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    	
    	<listener>
    		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    	</listener>
    	<filter>
    		<filter-name>encodingFilter</filter-name>
    		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    		<init-param>
    			<param-name>encoding</param-name>
    			<param-value>UTF-8</param-value>
    		</init-param>
    		<init-param>
    			<param-name>forceEncoding</param-name>
    			<param-value>true</param-value>
    		</init-param>
    	</filter>
    	<filter-mapping>
    		<filter-name>encodingFilter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    
    	<servlet>
    		<servlet-name>springServlet</servlet-name>
    		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    		<init-param>
    			<param-name>contextConfigLocation</param-name>
    			<param-value>classpath*:/spring-mvc*.xml</param-value>
    		</init-param>
    		<load-on-startup>1</load-on-startup>
    	</servlet>
    	<servlet-mapping>
    		<servlet-name>springServlet</servlet-name>
    		<url-pattern>/</url-pattern>
    	</servlet-mapping>
    
    	<servlet>
    		<servlet-name>DruidStatView</servlet-name>
    		<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
    		<init-param>
    			<param-name>allow</param-name>
    			<param-value>127.0.0.1</param-value>
    		</init-param>
    	</servlet>
    	<servlet-mapping>
    		<servlet-name>DruidStatView</servlet-name>
    		<url-pattern>/druid/*</url-pattern>
    	</servlet-mapping>
    
    	<session-config>
    		<session-timeout>600</session-timeout>
    	</session-config>
    	
    	
    	<servlet-mapping>  
        	<servlet-name>default</servlet-name>  
    		    <url-pattern>/js/*</url-pattern>  
    		    <url-pattern>/css/*</url-pattern>  
    		    <url-pattern>/images/*</url-pattern>  
    		    <url-pattern>/font/*</url-pattern>  
    		    <url-pattern>/assets/*</url-pattern>  
    		    <url-pattern>/lib/*</url-pattern>  
    	</servlet-mapping> 
    	
    </web-app>
    

    demo.properties

    #============================#
    #===== Database settings ====#
    #============================#
    
    #mysql database setting
    jdbc.type=mysql
    jdbc.driver=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://localhost:3306/stusystem?useUnicode=true&characterEncoding=utf-8
    jdbc.username=root
    jdbc.password=123456
    
    #pool settings
    jdbc.pool.init=1
    jdbc.pool.minIdle=3
    jdbc.pool.maxActive=20
    
    #jdbc.testSql=SELECT 'x'
    jdbc.testSql=SELECT 'x' FROM DUAL
    
    
    web.view.prefix=/
    web.view.suffix=.jsp
    
    
    web.view.index=/StuSystem/user/login
    

    六、各个模块代码

    **

    (1)用户模块:

    **
    UserBean.java:

    package com.stusystem.entity;
    import org.apache.ibatis.type.Alias;
    import org.springframework.stereotype.Component;
    @Alias("userbean")
    @Component
    public class Userbean {
    	private String userName;
    	private int userId;
    	private String admin;
    	private String password;
    	private String xmm;
    	public String getXmm() {
    		return xmm;
    	}
    	public void setXmm(String xmm) {
    		this.xmm = xmm;
    	}
    	public String getUserName() {
    		return userName;
    	}
    	public void setUserName(String userName) {
    		this.userName = userName;
    	}
    	public int getUserId() {
    		return userId;
    	}
    	public void setUserId(int userId) {
    		this.userId = userId;
    	}
    	public String getAdmin() {
    		return admin;
    	}
    	public void setAdmin(String admin) {
    		this.admin = admin;
    	}
    	public String getPassword() {
    		return password;
    	}
    	public void setPassword(String password) {
    		this.password = password;
    	}
    }
    
    

    UserDao.java:

    package com.stusystem.dao;
    
    import com.stusystem.entity.Userbean;
    
    
    public interface  UserDao {
    	//验证登录信息
    	public Userbean getUsrInfoByNameAndPsw(Userbean userbean);
    	//修改密码
    	public void mmxg(Userbean userbean);
    }
    
    

    UserDao.xml

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
    
    <!-- namesapce ,DAO的package路径  -->
    <mapper namespace="com.stusystem.dao.UserDao">
    	<!-- 根据用户输入的用户名和密码查询是否存在此用户  -->
    	<select id="getUsrInfoByNameAndPsw" parameterType="userbean" resultType="userbean">
    		select * from user where user_id=#{userId} and password=#{password} and admin=#{admin}
    	</select>
    	<!-- 修改登录用户的密码  -->
    	<update id="mmxg" parameterType="userbean">
    		UPDATE user SET password = #{xmm} WHERE (user_id=#{userId})
    	</update>
    </mapper>
    

    UserController.java:

    package com.stusystem.controller;
    import java.io.IOException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    import org.springframework.web.bind.annotation.RequestMapping;
    import com.stusystem.dao.UserDao;
    import com.stusystem.entity.Userbean;
    @Controller
    @RequestMapping(value = "user")
    public class UserController {
    	@Autowired
    	private UserDao userDao;
    //	ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring-context.xml");
    //	UserDao userDao = (UserDao) applicationContext.getBean("userDao");
    	//返回登陆界面
    	//验证用户的用户名和密码是有和数据库中的匹配
    	@RequestMapping(value = {"/login"})
    	public String userlogin() {
    		return "login";
    	}
    	//登陆验证
    	@RequestMapping(value = {"/loginyanzheng"})
    	public void loginyanzheng(Userbean userbean,HttpServletResponse response,HttpServletRequest request) throws IOException {
    		Userbean user = userDao.getUsrInfoByNameAndPsw(userbean);
    		if(user==null){
    			response.getWriter().println("{\"status\":0,\"msg\":\"用户名或密码有误!\"}");
    		}else{
    			// 用户的信息存放到session中。
    			HttpSession session = request.getSession();
    			session.setAttribute("userbean", user);
    			response.getWriter().println("{\"status\":1,\"url\":\"index\"}");
    		}
    	}
    	//返回系统主界面
    	@RequestMapping(value = {"/index"})
    	public String index() {
    		return "index";
    	}
    	//返回关于页面
    	@RequestMapping(value = {"/gy"})
    	public String guanyu() {
    		return "gy";
    	}
    	//返回密码修改页面
    	@RequestMapping(value = {"/dlmmxg"})
    	public String dlmmxg() {
    		return "dlmmxg";
    	}
    	//修改登录密码
    	@RequestMapping(value = {"/mmxg"})
    	public String mmxg(Userbean userbean,HttpServletResponse response,HttpServletRequest request){
    		Userbean user = userDao.getUsrInfoByNameAndPsw(userbean);
    		if(user==null){
    			request.setAttribute("status", '0');
    		}else{
    			userDao.mmxg(userbean);
    			request.setAttribute("status", '1');
    		}
    		return "dlmmxg";
    	}
    	//退出系统
    	@RequestMapping(value = {"/loginout"})
    	public String loginout(HttpServletRequest request){
    		HttpSession session = request.getSession();
    		session.invalidate();
    		return "login";
    	}
    }
    

    login.jsp

    <!DOCTYPE html>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html>
    <head>
    	<meta http-equiv="content-type" content="text/html">
    	<meta charset="UTF-8">
    	<title>学生成绩管理系统|登录</title>
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/host.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/animate.min.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/font-awesome.min.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/style.min.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/iconfont.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/js/validator-0.7.3/jquery.validator.css">
    	<link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    	<script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    	<script type="text/javascript" src="<%=request.getContextPath()%>/js/validator-0.7.3/jquery.validator.js"></script>
    	<script type="text/javascript" src="<%=request.getContextPath()%>/js/validator-0.7.3/local/zh_CN.js"></script>
    	<script type="text/javascript" src="<%=request.getContextPath()%>/js/host.js"></script>
    	<script type="text/javascript" src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    	<script type="text/javascript">
    		function login() {
    			var userid = document.getElementById("userid").value;
    			var password = document.getElementById("password").value;
    			var list = document.getElementsByName("inlineRadioOptions");
    			var admin = null;
    			if(!list[0].checked&&!list[1].checked&&!list[2].checked){
    				return;
    			}
    			for(var i = 0 ; i < list.length ; i++){
    				if(list[i].checked){
    					admin = list[i].value;
    				}
    			}
    			
    			$.ajax({
    				type : "POST",
    				data : "userId=" + userid + "&password=" + password +"&admin=" + admin,
    				dataType : "json",
    				url : "<%=request.getContextPath()%>/user/loginyanzheng",
    				success : function(result) {
    					
    					if (result.status == 0) {
    						swal("哦豁","用户名或密码有误,请重新输入!","error");
    					} else {
    						swal({title:"太帅了",text:"登录成功,进入系统!",type:"success"}, 
    							function () {
    							location.href = "/StuSystem_3/user/index";
    					    });
    					}
    				}
    			});
    		}
    	</script>
    </head>
    <body bgcolor="#FFFFFF">
    	<div class="middle-box text-center loginscreen  ">
            <div >
                <div  class="animated animated lightSpeedIn ">
                    <i class="icon iconfont">&#xf0028;</i>
                </div>
                <h3>欢迎使用 学生成绩管理系统</h3>
                <form class=" animated rollIn" data-validator-option="{theme:'yellow_right_effect',stopOnError:true}">
                    <div class="form-group">
                        <input type="text" class="form-control"  placeholder="用户名" data-rule="用户名:required;digits" id = "userid">
                    </div>
                    <div class="form-group">
                        <input type="password" class="form-control" placeholder="密码" data-rule="密码:required;password" id = "password">
                    </div>
                    <fieldset>
    	                <label class="radio-inline"  >
    					  <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="1" data-rule="checked"> 管理员
    					</label>
    					<label class="radio-inline">
    					  <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="2" > 教师
    					</label>
    					<label class="radio-inline">
    					  <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="3" > 学生
    					</label>
    				</fieldset>
    				<br/>
                	<br/>
                    <button type="submit" class="btn btn-primary block full-width " onclick="login();">登 录</button>
                </form>
                <br/>
                <br/>
                <div class = "animated bounceInLeft">
                   
                </div>
            </div>
        </div>
    	<div class="part"></div>
    </body>
    </html>
    

    index.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
     <head>
      <title>学生成绩管理系统|首页</title>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <link href="<%=request.getContextPath()%>/assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
       <link href="<%=request.getContextPath()%>/assets/css/bui-min.css" rel="stylesheet" type="text/css" />
       <link href="<%=request.getContextPath()%>/assets/css/main.css" rel="stylesheet" type="text/css" />
       <script type="text/javascript">
       	var index = layer.load(0, {shade: false}); //0代表加载的风格,支持0-2
       	
       </script>
     </head>
     <body>
       <div class="header">
        <div class="dl-title"><span class="">学生成绩管理系统</span></div>
        <div class="dl-log">欢迎您,<span class="dl-log-user">${userbean.userName}</span>
        <c:choose>
        	<c:when test="${userbean.admin == 1}">
        		<span class="admin">(管理员)</span>
        	</c:when>
        </c:choose>
        <c:choose>
        	<c:when test="${userbean.admin == 2}">
        		<span class="admin">(教师)</span>
        	</c:when>
        </c:choose>
        <c:choose>
        	<c:when test="${userbean.admin == 3}">
        		<span class="admin">(学生)</span>
        	</c:when>
        </c:choose>
            <a href="loginout" title="退出系统" class="dl-log-quit">[退出]</a>
        </div>
       </div>
       <div class="content">
        <div class="dl-main-nav">
          <ul id="J_Nav"  class="nav-list ks-clear">
            <li class="nav-item dl-selected"><div class="nav-item-inner nav-storage">首页</div></li>
          </ul>
        </div>
        <ul id="J_NavContent" class="dl-tab-conten">
        </ul>
       </div>
      <script type="text/javascript" src="<%=request.getContextPath()%>/assets/js/jquery-1.8.1.min.js"></script>
      <script type="text/javascript" src="<%=request.getContextPath()%>/assets/js/bui-min.js"></script>
      <script type="text/javascript" src="<%=request.getContextPath()%>/assets/js/config-min.js"></script>
      <script type="text/javascript" src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
      <script>
    	//学生登录
    	if('${userbean.admin}'=='3'){
    	BUI.use('common/main',function(){
          var config = [{
              id:'menu',
    		  homePage:'gy',
              menu:[{
                  text:'学生操作',
                  items:[
                    {id:'cjcx',text:'成绩查询',href:'/StuSystem_3/score/xsgrcjcx?studentId=' + '${userbean.userId}'},
                    {id:'xsgrkcgl',text:'学生个人课程管理',href:'/StuSystem_3/score/scoreone?page=1&studentId=' + '${userbean.userId}' },
    				{id:'xsgrxxgl',text:'学生个人信息管理',href:'/StuSystem_3/student/studentone?stuId=' + '${userbean.userId}' },
    				{id:'dlmmxg',text:'登录密码修改',href:'/StuSystem_3/user/dlmmxg'},
    				{id:'gy',text:'关于',href:'gy'}
                  ]
                }]
              }];
          new PageUtil.MainPage({
            modulesConfig : config
          });
        });
    }	
    	//教师登录
    if('${userbean.admin}'=='2'){
    	BUI.use('common/main',function(){
          var config = [{
              id:'menu',
    		  homePage:'gy',
              menu:[{
                  text:'教师操作',
                  items:[
                    {id:'xsxxgl',text:'学生信息管理',href:'/StuSystem_3/teacher/teacherlist?page=1'},
                    {id:'kcxxgl',text:'课程信息管理',href:'/StuSystem_3/student/studentlist?page=1'},
    				{id:'jsgrxxgl',text:'教师个人信息管理',href:'/StuSystem_3/teacher/teacherone?teacherId='+'${userbean.userId}'},
    				{id:'xscjgl',text:'学生成绩管理',href:'/StuSystem_3/score/scorelist?page=1'},
    				{id:'dlmmxg',text:'登录密码修改',href:'/StuSystem_3/user/dlmmxg'},
    				{id:'gy',text:'关于',href:'gy'}
                  ]
                }]
              }];
          new PageUtil.MainPage({
            modulesConfig : config
          });
        });
    }
    	//管理员登录
    	if('${userbean.admin}'=='1'){
    		BUI.use('common/main',function(){
    	      var config = [{
    	          id:'menu',
    			  homePage:'gy',
    	          menu:[{
    	              text:'管理员操作',
    	              items:[
    					{id:'jsxxgl',text:'教师信息管理',href:'/StuSystem_3/teacher/teacherlist?page=1'},
    	                {id:'xsxxgl',text:'学生信息管理',href:'/StuSystem_3/student/studentlist?page=1'},
    	                {id:'kcxxgl',text:'课程信息管理',href:'/StuSystem_3/subject/subjectlist?page=1'},
    	                {id:'xscjgl',text:'学生成绩管理',href:'/StuSystem_3/score/scorelist?page=1'},
    					{id:'dlmmxg',text:'登录密码修改',href:'/StuSystem_3/user/dlmmxg'},
    					{id:'gy',text:'关于',href:'gy'}
    	              ]
    	            }]
    	          }];
    	      new PageUtil.MainPage({
    	        modulesConfig : config
    	      });
    	    });
    	}
      </script>
     </body>
    </html>
    

    dlmmxg.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="<%=request.getContextPath()%>/css/H-ui.css" rel="stylesheet" type="text/css" />
    <link href="<%=request.getContextPath()%>/css/H-ui.1.x.patch.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/passwordStrength-min.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    $(function(){
    	$("#demoform-2").Validform({
    		tiptype:2,
    		usePlugin:{
    			datepicker:{},//日期控件校验;
    			passwordstrength:{
    				minLen:6,//设置密码长度最小值,默认为0;
    				maxLen:18,//设置密码长度最大值,默认为30;
    				trigger:function(obj,error){
    					//该表单元素的keyup和blur事件会触发该函数的执行;
    					//obj:当前表单元素jquery对象;
    					//error:所设密码是否符合验证要求,验证不能通过error为true,验证通过则为false;	
    					//console.log(error);
    					if(error){
    						obj.parent().find(".Validform_checktip").show();
    						obj.parent().find(".passwordStrength").hide();
    					}else{
    						obj.parent().find(".passwordStrength").show();
    					}
    				}
    			}
    		}
    	});
    });
    </script>
    <title>教师信息编辑页面</title>
    </head>
    <body>
    	<form action="mmxg" method="post" class="form form-horizontal responsive" id="demoform-2">
              <div class="row cl">
                <label class="form-label col-2">旧密码:</label>
                <div class="formControls col-5">
                  <input type="text" name="userId" id = "userId" value="${userbean.userId}"  style="display:none;"/>
                  <input type="text" name="admin" id = "admin" value="${userbean.admin}"  style="display:none;"/>
                  <input type="password" class="input-text" placeholder="请输入旧密码" name="password" id="password" datatype="*6-16" nullmsg="旧密码不能为空"  value = "">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
              <label class="form-label col-2">新密码:</label>
                <div class="formControls col-5">
                  <input type="password" class="input-text" autocomplete="off" placeholder="密码" name="xmm" id="password1" datatype="*6-18" nullmsg="请输入密码!" >
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">密码验证:</label>
                <div class="formControls col-5">
                  <input type="password" class="input-text" autocomplete="off" placeholder="密码" name="password2" id="password2" recheck="xmm" datatype="*6-18" nullmsg="请再输入一次密码!" errormsg="您两次输入的密码不一致!" >
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <div class="col-10 col-offset-2">
                  <input class="btn btn-primary" type="submit" onclick="tijiao();" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
              </div>
            </form>
    </body>
    <script type="text/javascript">
    
    if("${status}" == '1'){
    	swal({title:"密码修改成功!",text:"您已经向服务器了这条信息!",type:"success"}, 
    			function () {
    	  			location.href = "dlmmxg";
    	    });
    	
    }else if("${status}" == '0'){
    	swal("哦豁","修改失败失败,请确保密码输入正确!","error");
    }else{}
    
    </script>
    </html>
    

    **

    (2)学生模块

    **
    StudentBean.java:

    package com.stusystem.entity;
    
    
    public class StudentBean {
    	private int stuId;
    	private String stuName;
    	private String stuSex;
    	private String stuSystem;
    	private String stuClass;
    	private String stuPhone;
    	private int page;
    	public int getPage() {
    		return (page-1)*6;
    	}
    	public void setPage(int page) {
    		this.page = page;
    	}
    	public int getStuId() {
    		return stuId;
    	}
    	public void setStuId(int stuId) {
    		this.stuId = stuId;
    	}
    	public String getStuName() {
    		return stuName;
    	}
    	public void setStuName(String stuName) {
    		this.stuName = stuName;
    	}
    	public String getStuSex() {
    		return stuSex;
    	}
    	public void setStuSex(String stuSex) {
    		this.stuSex = stuSex;
    	}
    	public String getStuSystem() {
    		return stuSystem;
    	}
    	public void setStuSystem(String stuSystem) {
    		this.stuSystem = stuSystem;
    	}
    	public String getStuClass() {
    		return stuClass;
    	}
    	public void setStuClass(String stuClass) {
    		this.stuClass = stuClass;
    	}
    	public String getStuPhone() {
    		return stuPhone;
    	}
    	public void setStuPhone(String stuPhone) {
    		this.stuPhone = stuPhone;
    	}
    } 
    

    StudentDao.java:

    package com.stusystem.dao;
    import java.util.List;
    import com.stusystem.entity.StudentBean;
    public interface StudentDao {
    public List<StudentBean> getStudent(StudentBean studentbean) throws Exception;//返回学生信息的list
    public int getstupage(StudentBean studentbean) throws Exception;//分页处理
    public StudentBean getStudentone (StudentBean studentbean) throws Exception;//返回一条学生信息
    public void studentdel(StudentBean studentbean) throws Exception;//删除一条学生信息
    public void studentadd(StudentBean studentbean) throws Exception;//增加一条学生信息
    public void studentxiugai(StudentBean studentbean) throws Exception;//修改一条学生信息
    }
    
    

    StudentDao.xml:

    ```java
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
    
    <!-- namespace ,DAO的package路径  -->
    <mapper namespace="com.stusystem.dao.StudentDao"> 
    	<!-- 查询出多条学生信息 -->
    	<select id="getStudent" parameterType="com.stusystem.entity.StudentBean" resultType="com.stusystem.entity.StudentBean">
    		<if test=" stuName != null and stuName != '' "> SELECT * FROM student where stu_name = #{stuName} limit #{page} , 6 </if>
    		<if test=" stuName == null or stuName == '' "> SELECT * FROM student limit #{page} , 6 </if>
    	</select>
    	<!--分页处理  -->
    	<select id="getstupage" parameterType="com.stusystem.entity.StudentBean" resultType="int">
    		<if test=" stuName != null and stuName != '' "> select count(*) from student where stu_name = #{stuName} </if>
    		<if test=" stuName == null or stuName == '' "> select count(*) from student </if>
    	</select>
    	<!--根据id查询出一条学生信息-->
    	<select id="getStudentone" parameterType="com.stusystem.entity.StudentBean" resultType="com.stusystem.entity.StudentBean" >
    		SELECT * FROM student WHERE stu_id=#{stuId}
    	</select>
    	<!-- 删除一条学生信息  -->
    	<delete id="studentdel" parameterType="com.stusystem.entity.StudentBean" >
    		DELETE FROM student WHERE (stu_id=#{stuId})
    	</delete>
    	<!-- 修改一条学生信息 -->
    	<update id="studentxiugai" parameterType="com.stusystem.entity.StudentBean">
    		UPDATE student SET stu_name=#{stuName}, stu_sex=#{stuSex}, stu_system=#{stuSystem}, stu_phone=#{stuPhone}, stu_class=#{stuClass} WHERE (stu_id=#{stuId})
    	</update>
    	<!-- 添加一条学生信息 -->
    	<insert id="studentadd" parameterType="com.stusystem.entity.StudentBean">
    		INSERT INTO student (stu_name, stu_sex, stu_system, stu_phone, stu_class) VALUES (#{stuName},#{stuSex},#{stuSystem},#{stuPhone},#{stuClass})
    	</insert>
    </mapper>
    

    StudentController.java

    package com.stusystem.controller;
    
    import java.io.IOException;
    import java.net.URLDecoder;
    import java.util.List;
    
    import javax.servlet.http.HttpServletResponse;
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    
    import com.stusystem.dao.StudentDao;
    import com.stusystem.entity.StudentBean;
    
    @Controller
    @RequestMapping(value = "student")
    public class StudentController {
    	@Autowired
    	private StudentDao studentDao;
    //	ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring-context.xml");
    //	StudentDao studentDao = (StudentDao) applicationContext.getBean("studentDao");
    	
    	//得到学生列表和页数.返回到学生信息页面
    	@RequestMapping(value = {"/studentlist"})
    	public String getStudent(StudentBean stu,Model model) throws Exception{
    		if(stu.getStuName()!=null&&stu.getStuName()!=""){
    			stu.setStuName(URLDecoder.decode(stu.getStuName(), "UTF-8"));
    		}
    		List<StudentBean> stulist = studentDao.getStudent(stu);
    		int stupage = studentDao.getstupage(stu);
    		model.addAttribute("studentlist", stulist);
    		model.addAttribute("stupage", stupage);
    		model.addAttribute("studentname", stu.getStuName());
    		return "studentlist";
    	}
    	//得到一个学生信息。返回到一个学生信息页面
    	@RequestMapping(value = {"/studentone"})
    	public String getStudentone(StudentBean stu,Model model) throws Exception {
    		StudentBean studentone = studentDao.getStudentone(stu);
    		model.addAttribute("stuone", studentone);
    		return "studentone";
    	}
    	//得到一个学生信息。返回到学生编辑页面
    	@RequestMapping(value = {"/studenteditor"})
    	public String studenteditor(StudentBean stu,Model model) throws Exception {
    		if(stu.getStuId()==0){
    			return "studenteditor";
    		}else{
    			StudentBean studentone = studentDao.getStudentone(stu);
    			model.addAttribute("studentone", studentone);
    			return "studenteditor";
    		}
    	}
    	//删除学生信息
    	@RequestMapping(value = {"/studentdel"})
    	public void studentdel(StudentBean stu,HttpServletResponse response) throws IOException {
    		int a = 0;
    		try {
    			studentDao.studentdel(stu);
    		} catch (Exception e) {
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}else{
    		}
    	}
    	//添加/修改   ( 以是否有stuId来判断)     学生信息
    	@RequestMapping(value = {"/studentadd"})
    	public void studentadd(StudentBean stu,HttpServletResponse response) throws IOException{
    		int a = 0;
    		try {
    			if(stu.getStuId()==0){
    				stu.setStuName(URLDecoder.decode(stu.getStuName(), "UTF-8"));
    				stu.setStuSystem(URLDecoder.decode(stu.getStuSystem(), "UTF-8"));
    				stu.setStuSex(URLDecoder.decode(stu.getStuSex(), "UTF-8"));
    				stu.setStuClass(URLDecoder.decode(stu.getStuClass(), "UTF-8"));
    				studentDao.studentadd(stu);
    			}else{
    				stu.setStuName(URLDecoder.decode(stu.getStuName(), "UTF-8"));
    				stu.setStuSystem(URLDecoder.decode(stu.getStuSystem(), "UTF-8"));
    				stu.setStuSex(URLDecoder.decode(stu.getStuSex(), "UTF-8"));
    				stu.setStuClass(URLDecoder.decode(stu.getStuClass(), "UTF-8"));
    				studentDao.studentxiugai(stu);
    			}
    		} catch (Exception e) {
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}else{
    		}
    	}
    }
    

    studentlist.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    function del(studentid) {
    	 swal({
    	        title: "您确定要删除这条信息吗",
    	        text: "删除后将无法恢复,请谨慎操作!",
    	        type: "warning",
    	        showCancelButton: true,
    	        confirmButtonColor: "#DD6B55",
    	        confirmButtonText: "删除",
    	        closeOnConfirm: false
    	    }, function () {
    	    	if (window.XMLHttpRequest){
    	    		// code for IE7+, Firefox, Chrome, Opera, Safari
    	    	  	xmlhttp=new XMLHttpRequest();
    	    	  }
    	    	else{// code for IE6, IE5
    	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    	    	  }                                                       //创建XMLHttpRequest对象
    	    	xmlhttp.onreadystatechange=function(){
    	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
    	    		  var a = eval("("+xmlhttp.responseText+")");
    	    		  if(a.status== 1){
    	    			  swal({title:"删除成功!",text:"您已经永久删除了这条信息!",type:"success"}, 
    								function () {
    	    				  			var b = '${stupage}' ;
    	    				  			b = Math.ceil(b/6) ;
    	    				  			location.href = "studentlist?page=" + b;
    						    });
    	    		  }else{
    	    			  swal("哦豁","删除失败,请重试!","error");
    	    		  }
    	    	    }
    	    	  }	;											//服务器响应时完成相应操作
    	    	xmlhttp.open("post","studentdel?stuId="+studentid,true);
    	    	xmlhttp.send();
    	    });
    }
    </script>
    <title>学生列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    		<div class="row">
    		  <div class="col-md-3">
    		  	<div class="input-group">
    		      <input type="text" class="form-control" placeholder="输入学生姓名搜索" id = "sousuo" value = "${studentname}">
    		      <span class="input-group-btn">
    		        <button class="btn btn-default" type="button" onclick="sousuo();">Go!</button>
    		      </span>
    	    	</div>
    		  </div>
    		  <div class="col-md-3"><button type="button" class="btn btn-default" onclick="tianjia();">添加+</button></div>
    		  <div class="col-md-6"></div>
    		</div>
    		
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>学号</th>
    			<th>学生姓名</th>
    			<th>学生性别</th>
    			<th>所在系</th>
    			<th>班级</th>
    			<th>电话号码</th>
    			<th>操作</th>
    		</tr>
    		<c:forEach items="${studentlist}" var="stu">
    			<tr>
    				<td>${stu.stuId}</td>
    				<td>${stu.stuName}</td>
    				<td>${stu.stuSex}</td>
    				<td>${stu.stuSystem}</td>
    				<td>${stu.stuClass}</td>
    				<td>${stu.stuPhone}</td>
    				<td><button type="button" class="btn btn-info btn-xs" onclick="bianji(${stu.stuId});" ><i class="iconfont">&#xe66e;</i>&nbsp;编辑</button>&nbsp;&nbsp;<button type="button" onclick="del(${stu.stuId});" class="btn btn-danger btn-xs"><i class="iconfont">&#xe614;</i>&nbsp;删除</button></td>
    			</tr>
    		</c:forEach>
    	</table>
    	<div id="page11" style="margin-top:5px; text-align:center;"></div>
    </body>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
    laypage({
        cont: 'page11',
        pages: Math.ceil("${stupage}"/6), //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18 length
        skip: true, //是否开启跳页
        skin: '#6699FF',
        curr: function(){ //通过url获取当前页,也可以同上(pages)方式获取
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;
        }(), 
        jump: function(e, first){ //触发分页后的回调
            if(!first){ //一定要加此判断,否则初始时会无限刷新
            	var studengtname = document.getElementById("sousuo").value;
                location.href = '?page='+e.curr + '&stuName=' + encodeURI(encodeURI(studengtname));
            }
        }
    });
    </script>
    <script type="text/javascript">
    	function bianji(studentId) {
    		layer.open({
    		    type: 2,
    		    title: '学生信息编辑页面',
    		    shadeClose: true,
    		    shade: 0.8,
    		    shift: 1, //0-6的动画形式,-1不开启
    		    area: ['800px', '80%'],
    		    content: 'studenteditor?stuId='+ studentId
    		});
    	}
    	 function tianjia() {
    		 layer.open({
    			    type: 2,
    			    title: '学生信息添加页面',
    			    shadeClose: true,
    			    shade: 0.8,
    			    shift: 1, //0-6的动画形式,-1不开启
    			    area: ['800px', '80%'],
    			    content: 'studenteditor?stuId=0'
    			}); 
    	}
    </script>
    <script type="text/javascript">
    	function sousuo() {
    		var studentname = document.getElementById("sousuo").value;
    		location.href = 'studentlist?stuName='+ encodeURI(encodeURI(studentname)) + '&page=1' ;
    	}
    </script>
    </html>
    

    studentone.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <title>学生信息列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生个人信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>学号</th>
    			<th>学生姓名</th>
    			<th>学生性别</th>
    			<th>所在系</th>
    			<th>班级</th>
    			<th>电话号码</th>
    			<th>操作</th>
    		</tr>
    		<tr>
    				<td>${stuone.stuId}</td>
    				<td>${stuone.stuName}</td>
    				<td>${stuone.stuSex}</td>
    				<td>${stuone.stuSystem}</td>
    				<td>${stuone.stuClass}</td>
    				<td>${stuone.stuPhone}</td>
    				<td>
    					<button id = "xiugai" type="button" class="btn btn-info btn-xs" οnclick="xiugai();" >
    						<i class="iconfont">&#xe66e;</i>
    						&nbsp;编辑
    					</button>
    				</td>
    		</tr>
    	</table>
    </body>
    <script type="text/javascript">
    function xiugai() {
    	layer.open({
    	    type: 2,
    	    title: '学生个人信息修改页面',
    	    shadeClose: true,
    	    shade: 0.8,
    	    shift: 1, //0-6的动画形式,-1不开启
    	    area: ['800px', '80%'],
    	    content: 'studenteditor?stuId='+"${stuone.stuId}"
    	}); 
    }
    </script>
    </html>
    

    studenteditor.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="<%=request.getContextPath()%>/css/H-ui.css" rel="stylesheet" type="text/css" />
    <link href="<%=request.getContextPath()%>/css/H-ui.1.x.patch.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/passwordStrength-min.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    $(function(){
    	$("#demoform-2").Validform({
    		tiptype:2,
    		usePlugin:{
    			datepicker:{},//日期控件校验;
    			passwordstrength:{
    				minLen:6,//设置密码长度最小值,默认为0;
    				maxLen:18,//设置密码长度最大值,默认为30;
    				trigger:function(obj,error){
    					//该表单元素的keyup和blur事件会触发该函数的执行;
    					//obj:当前表单元素jquery对象;
    					//error:所设密码是否符合验证要求,验证不能通过error为true,验证通过则为false;	
    					//console.log(error);
    					if(error){
    						obj.parent().find(".Validform_checktip").show();
    						obj.parent().find(".passwordStrength").hide();
    					}else{
    						obj.parent().find(".passwordStrength").show();
    					}
    				}
    			}
    		}
    	});
    });
    </script>
    <title>教师信息编辑页面</title>
    </head>
    <body>
    	<form action="" method="post" class="form form-horizontal responsive" id="demoform-2">
              <div class="row cl">
                <label class="form-label col-2">姓名:</label>
                <div class="formControls col-5">
                  <input type="text" name="studentid" id = "studentid" value="${studentone.stuId}"  style="display:none;"/>
                  <input type="text" class="input-text" placeholder="请输入学生姓名" name="studentname" id="studentname" datatype="s2-5" nullmsg="学生姓名不能为空"  value = "${studentone.stuName}">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">所在系:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" placeholder="请输入学生所在系" name="studentsystem" id="studentsystem" datatype="s2-10" nullmsg="所在系不能为空" value = "${studentone.stuSystem}">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">电话号码:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" autocomplete="off" placeholder="手机号码" name="studentphone" id="studentphone" datatype="m" nullmsg="电话号码不能为空" value = "${studentone.stuPhone}">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">班级:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" placeholder="请输入学生班级" name="studentclass" id="studentclass" datatype="s2-10" nullmsg="班级不能为空" value = "${studentone.stuClass}">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">学生性别:</label>
                <div class="formControls skin-minimal col-5">
                  <div class="radio-box">
                    <input type="radio" id="sex-1" name="studentsex" value = "男" datatype="*" nullmsg="请选择性别!">
                    <label for="sex-1"></label>
                  </div>
                  <div class="radio-box">
                    <input type="radio" id="sex-2" name="studentsex" value = "女">
                    <label for="sex-2"></label>
                  </div>
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <div class="col-10 col-offset-2">
                  <input class="btn btn-primary" type="button" οnclick="hehe();" id = "tijiao" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
              </div>
            </form>
    </body>
    		<script type="text/javascript">
            	if('${studentone.stuSex}' =="女"){
            		document.getElementById('sex-2').checked="checked";
            	}else if('${studentone.stuSex}' =="男") {
            		document.getElementById('sex-1').checked="checked";
            	}else{
            		
            	}
            </script>
            <script type="text/javascript">
             function hehe() {
            	 var studentname = document.getElementById("studentname").value;
                 var studentsystem = document.getElementById("studentsystem").value;
                 var studentid = document.getElementById("studentid").value;
                 if(studentid==""){
                	 studentid = 0;
                 }
                 var studentphone = document.getElementById("studentphone").value;
                 var studentclass = document.getElementById("studentclass").value;
                 var list = document.getElementsByName("studentsex");
                 var studentsex = null;
                 for(var i = 0 ; i < list.length ; i++){
        				if(list[i].checked){
        					studentsex = list[i].value;
        				}
        			}
                 if(studentname==""||studentsystem==""||studentphone==""||studentclass==""||studentsex==""){
                	 swal("哦豁","提交失败,请重试!","error");
                	 return;
                 }
                 if (window.XMLHttpRequest){
        	    		// code for IE7+, Firefox, Chrome, Opera, Safari
        	    	  	xmlhttp=new XMLHttpRequest();
        	    	  }
        	    	else{// code for IE6, IE5
        	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        	    	  }                                                       //创建XMLHttpRequest对象
        	    	xmlhttp.onreadystatechange=function(){
        	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
        	    		  var a = eval("("+xmlhttp.responseText+")");
        	    		  if(a.status == 1){
        	    			  swal({title:"提交成功!",text:"您已经向服务器了这条信息!",type:"success"}, 
        								function () {
        	    				  			parent.top.topManager.reloadPage();
        	    				  			parent.layer.closeAll();
        						    });
        	    		  }else{
        	    			  swal("哦豁","提交失败,请重试!","error");
        	    		  }
        	    	    }
        	    	  }	;											//服务器响应时完成相应操作
        	    	xmlhttp.open("post","studentadd?stuName="+encodeURI(encodeURI(studentname)) + "&stuSystem=" + encodeURI(encodeURI(studentsystem))+ "&stuId=" + studentid + "&stuPhone=" + encodeURI(encodeURI(studentphone))+ "&stuClass=" + encodeURI(encodeURI(studentclass))+ "&stuSex=" + encodeURI(encodeURI(studentsex)) ,true);
        	    	xmlhttp.send();
    		}
    		</script>
    </html>
    

    **

    (3)教师模块

    **
    TeacherBean.java

    package com.stusystem.entity;
    import org.apache.ibatis.type.Alias;
    import org.springframework.stereotype.Component;
    @Alias("teacherBean")
    @Component
    public class TeacherBean {
    	private int teacherId;
    	private String teacherName;
    	private String teacherSex;
    	private String teacherSystem;
    	private String teacherPhone;
    	private String teacherEmail;
    	public String getTeacherEmail() {
    		return teacherEmail;
    	}
    	public void setTeacherEmail(String teacherEmail) {
    		this.teacherEmail = teacherEmail;
    	}
    	private int page;
    	public int getPage() {
    		return (page-1)*6;
    	}
    	public void setPage(int page) {
    		this.page = page;
    	}
    	public int getTeacherId() {
    		return teacherId;
    	}
    	public void setTeacherId(int teacherId) {
    		this.teacherId = teacherId;
    	}
    	public String getTeacherName() {
    		return teacherName;
    	}
    	public void setTeacherName(String teacherName) {
    		this.teacherName = teacherName;
    	}
    	public String getTeacherSystem() {
    		return teacherSystem;
    	}
    	public String getTeacherSex() {
    		return teacherSex;
    	}
    	public void setTeacherSex(String teacherSex) {
    		this.teacherSex = teacherSex;
    	}
    	public void setTeacherSystem(String teacherSystem) {
    		this.teacherSystem = teacherSystem;
    	}
    	public String getTeacherPhone() {
    		return teacherPhone;
    	}
    	public void setTeacherPhone(String teacherPhone) {
    		this.teacherPhone = teacherPhone;
    	}
    }
    

    TeacherDao.java

    package com.stusystem.dao;
    import com.stusystem.entity.*;
    import java.util.*;
    public interface TeacherDao {
    public List<TeacherBean> getTeacher(TeacherBean teacherbean) throws Exception;
    public int getteapage(TeacherBean teacherbean) throws Exception;//返回教师信息有多少页
    public TeacherBean getTeacherone(TeacherBean teacherbean) throws Exception;//根据Id返回一条教师记录
    public void teacherdel(TeacherBean teacherbean) throws Exception;
    public void teacheradd(TeacherBean teacherbean) throws Exception;
    public void teacherxiugai(TeacherBean teacherbean) throws Exception;
    }
    
    

    TeacherDao.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
    <!-- namespace ,DAO的package路径  -->
    <mapper namespace="com.stusystem.dao.TeacherDao">
    <select id="getTeacher" parameterType="teacherBean" resultType="teacherBean">
    <if test=" teacherName != null and teacherName != '' "> SELECT * FROM teacher where teacher_name = #{teacherName} limit #{page} , 6 </if>
    		<if test=" teacherName == null or teacherName == '' "> SELECT * FROM teacher limit #{page} , 6 </if>
    </select>
    <!-- 查询出所有教师信息可以分为多少页,在前端做分页处理  -->
    	<select id="getteapage" parameterType="teacherBean" resultType="int">
    		<if test=" teacherName != null and teacherName != '' "> select count(*) from `teacher` where teacher_name = #{teacherName} </if>
    		<if test=" teacherName == null or teacherName == '' "> select count(*) from `teacher` </if>
    	</select>
    	<!-- 根据id查询出一条教师信息  -->
    	<select id="getTeacherone" parameterType="teacherBean" resultType="teacherBean" >
    		SELECT * FROM teacher WHERE teacher_id=#{teacherId}
    	</select>
    	<!-- 删除一条教师记录  -->
    	<delete id="teacherdel" parameterType="teacherBean" >
    		DELETE FROM `teacher` WHERE (`teacher_id`=#{teacherId})
    	</delete>
    	<!--修改一条教师记录  -->
    	<update id="teacherxiugai" parameterType="teacherBean">
    		UPDATE teacher SET teacher_name=#{teacherName}, teacher_sex=#{teacherSex}, teacher_system=#{teacherSystem}, teacher_phone=#{teacherPhone}, teacher_email=#{teacherEmail} WHERE (teacher_id=#{teacherId})
    	</update>
    	<!-- 添加一条教师记录  -->
    	<insert id="teacheradd" parameterType="teacherBean">
    		INSERT INTO `teacher` (`teacher_name`, `teacher_sex`, `teacher_system`, `teacher_phone`, `teacher_email`) VALUES (#{teacherName},#{teacherSex},#{teacherSystem},#{teacherPhone},#{teacherEmail})
    	</insert>
    </mapper>
    

    TeacherController,java

    package com.stusystem.controller;
    
    import java.io.IOException;
    import java.net.URLDecoder;
    import java.util.List;
    
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    
    import com.stusystem.dao.TeacherDao;
    import com.stusystem.entity.TeacherBean;
    
    @Controller
    @RequestMapping("teacher")
    public class TeacherController {
         @Autowired
         TeacherDao teacherDao;
         @RequestMapping("/teacherlist")
         public String getTeacher(TeacherBean tea,Model model,HttpServletRequest request) throws Exception{
        	 if(tea.getTeacherName()!=null&&tea.getTeacherName()!=""){
     			tea.setTeacherName(URLDecoder.decode(tea.getTeacherName(), "UTF-8"));
     		}
        	 List<TeacherBean> teacherlist=teacherDao.getTeacher(tea);
        	 int teapage=teacherDao.getteapage(tea);
        	 model.addAttribute("teacherlist",teacherlist);
        	 model.addAttribute("teapage",teapage);
        	 model.addAttribute("teachername",tea.getTeacherName());
        	 return "teacherlist";
         }
         @RequestMapping("/teacherone")
         public String getTeacherone(TeacherBean tea,Model model) throws Exception{
        	 TeacherBean teacherone=teacherDao.getTeacherone(tea);
        	 model.addAttribute("teaone",teacherone);
        	 return "teacherone";
         }
         @RequestMapping("/teachereditor")
         public String teachereditor(TeacherBean tea,Model model) throws Exception{
        	 if(tea.getTeacherId()==0) {
        		 return "teachereditor";
        	 }else {
        		 TeacherBean teacherone=teacherDao.getTeacherone(tea);
        		 model.addAttribute("teacherone",teacherone);
        		 return "teachereditor";
        	 }
         }
         @RequestMapping("/teacherdel")
         public void teacherdel(TeacherBean tea,HttpServletResponse response) throws IOException{
        		int a = 0;
        		try {
        			teacherDao.teacherdel(tea);
        		} catch (Exception e) {
        			a=a+1;
        			response.getWriter().println("{'status':'0'}");
        			e.printStackTrace();
        		}
        		if(a==0){
        			response.getWriter().println("{'status':'1'}");
        		}else{
        		}
        	 
         }
       //添加一条教师用户信息
     	@RequestMapping(value = {"/teacheradd"})
     	public void teacheradd(TeacherBean tea,HttpServletResponse response) throws IOException{
     		int a = 0;
     		try {
     			if(tea.getTeacherId()==0){
     				tea.setTeacherName(URLDecoder.decode(tea.getTeacherName(), "UTF-8"));
     				tea.setTeacherSystem(URLDecoder.decode(tea.getTeacherSystem(), "UTF-8"));
     				tea.setTeacherSex(URLDecoder.decode(tea.getTeacherSex(), "UTF-8"));
     				tea.setTeacherEmail(URLDecoder.decode(tea.getTeacherEmail(), "UTF-8"));
     				teacherDao.teacheradd(tea);
     			}else{
     				tea.setTeacherName(URLDecoder.decode(tea.getTeacherName(), "UTF-8"));
     				tea.setTeacherSystem(URLDecoder.decode(tea.getTeacherSystem(), "UTF-8"));
     				tea.setTeacherSex(URLDecoder.decode(tea.getTeacherSex(), "UTF-8"));
     				tea.setTeacherEmail(URLDecoder.decode(tea.getTeacherEmail(), "UTF-8"));
     				teacherDao.teacherxiugai(tea);
     			}
     		} catch (Exception e) {
     			a=a+1;
     			response.getWriter().println("{'status':'0'}");
     			e.printStackTrace();
     		}
     		if(a==0){
     			response.getWriter().println("{'status':'1'}");
     		}else{
     		}
     	}
    }
    
    

    teacherlist.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    function del(teacherid) {
    	 swal({
    	        title: "您确定要删除这条信息吗",
    	        text: "删除后将无法恢复,请谨慎操作!",
    	        type: "warning",
    	        showCancelButton: true,
    	        confirmButtonColor: "#DD6B55",
    	        confirmButtonText: "删除",
    	        closeOnConfirm: false
    	    }, function () {
    	    	if (window.XMLHttpRequest){
    	    		// code for IE7+, Firefox, Chrome, Opera, Safari
    	    	  	xmlhttp=new XMLHttpRequest();
    	    	  }
    	    	else{// code for IE6, IE5
    	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    	    	  }                                                       //创建XMLHttpRequest对象
    	    	xmlhttp.onreadystatechange=function(){
    	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
    	    		  var a = eval("("+xmlhttp.responseText+")");
    	    		  if(a.status== 1){
    	    			  swal({title:"删除成功!",text:"您已经永久删除了这条信息!",type:"success"}, 
    								function () {
    	    				  			var b = '${teapage}' ;
    				  					b = Math.ceil(b/6) ;
    	    				  			location.href = "teacherlist?page="+b;
    						    });
    	    		  }else{
    	    			  swal("哦豁","删除失败,请重试!","error");
    	    		  }
    	    	    }
    	    	  }	;											//服务器响应时完成相应操作
    	    	xmlhttp.open("post","teacherdel?teacherId="+teacherid,true);
    	    	xmlhttp.send();
    	    });
    }
    </script>
    <title>教师列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">教师信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    		<div class="row">
    		  <div class="col-md-3">
    		  	<div class="input-group">
    		      <input type="text" class="form-control" id ="sousuo" placeholder="输入教师姓名搜索" value = "${teachername}" >
    		      <span class="input-group-btn">
    		        <button class="btn btn-default" type="button" onclick="sousuo();">Go!</button>
    		      </span>
    	    	</div>
    		  </div>
    		  <div class="col-md-3"><button type="button" class="btn btn-default" onclick="tianjia();">添加+</button></div>
    		  <div class="col-md-6"></div>
    		</div>
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>教师编号</th>
    			<th>教师姓名</th>
    			<th>教师性别</th>
    			<th>所在系</th>
    			<th>电话号码</th>
    			<th>邮箱</th>
    			<th>操作</th>
    		</tr>
    		<c:forEach items="${teacherlist}" var="tea">
    			<tr>
    				<td>${tea.teacherId}</td>
    				<td>${tea.teacherName}</td>
    				<td>${tea.teacherSex}</td>
    				<td>${tea.teacherSystem}</td>
    				<td>${tea.teacherPhone}</td>
    				<td>${tea.teacherEmail}</td>
    				<td><button type="button" class="btn btn-info btn-xs" onclick="bianji(${tea.teacherId});" ><i class="iconfont">&#xe66e;</i>&nbsp;编辑</button>&nbsp;&nbsp;<button type="button" onclick="del(${tea.teacherId});" class="btn btn-danger btn-xs"><i class="iconfont">&#xe614;</i>&nbsp;删除</button></td>
    			</tr>
    		</c:forEach>
    	</table>
    	<div id="page11" style="margin-top:5px; text-align:center;"></div>
    </body>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
    laypage({
        cont: 'page11',
        pages: Math.ceil("${teapage}"/6), //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18
        skip: true, //是否开启跳页
        skin: '#6699FF',
        curr: function(){ //通过url获取当前页,也可以同上(pages)方式获取
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;
        }(), 
        jump: function(e, first){ //触发分页后的回调
            if(!first){ //一定要加此判断,否则初始时会无限刷新
            	var teachername = document.getElementById("sousuo").value;
                location.href = '?page='+e.curr + '&teacherName=' + encodeURI(encodeURI(teachername));
            }
        }
    });
    </script>
    <script type="text/javascript">
    	function bianji(teacherId) {
    		layer.open({
    		    type: 2,
    		    title: '教师信息编辑页面',
    		    shadeClose: true,
    		    shade: 0.8,
    		    shift: 1, //0-6的动画形式,-1不开启
    		    area: ['800px', '80%'],
    		    content: 'teachereditor?teacherId='+ teacherId
    		});
    	}
    	 function tianjia() {
    		 layer.open({
    			    type: 2,
    			    title: '教师信息编辑页面',
    			    shadeClose: true,
    			    shade: 0.8,
    			    shift: 1, //0-6的动画形式,-1不开启
    			    area: ['800px', '80%'],
    			    content: 'teachereditor?teacherId=0'
    			}); 
    	}
    </script>
    <script type="text/javascript">
    	function sousuo() {
    		var teachername = document.getElementById("sousuo").value;
    		location.href = 'teacherlist?teacherName='+ encodeURI(encodeURI(teachername)) + '&page=1' ;
    	}
    </script>
    </html>
    

    teacherone.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <title>教师信息列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">教师个人信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>教师编号</th>
    			<th>教师姓名</th>
    			<th>教师性别</th>
    			<th>系别</th>
    			<th>电话号码</th>
    			<th>邮箱</th>
    			<th>操作</th>
    		</tr>
    		<tr>
    				<td>${teaone.teacherId}</td>
    				<td>${teaone.teacherName}</td>
    				<td>${teaone.teacherSex}</td>
    				<td>${teaone.teacherSystem}</td>
    				<td>${teaone.teacherPhone}</td>
    				<td>${teaone.teacherEmail}</td>
    				<td>
    					<button id = "xiugai" type="button" class="btn btn-info btn-xs" οnclick="xiugai();" >
    						<i class="iconfont">&#xe66e;</i>
    						&nbsp;编辑
    					</button>
    				</td>
    		</tr>
    	</table>
    </body>
    <script type="text/javascript">
    function xiugai() {
    	layer.open({
    	    type: 2,
    	    title: '学生个人信息修改页面',
    	    shadeClose: true,
    	    shade: 0.8,
    	    shift: 1, //0-6的动画形式,-1不开启
    	    area: ['800px', '80%'],
    	    content: 'teachereditor?teacherId='+"${teaone.teacherId}"
    	}); 
    }
    </script>
    </html>
    

    teachereditor.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="<%=request.getContextPath()%>/css/H-ui.css" rel="stylesheet" type="text/css" />
    <link href="<%=request.getContextPath()%>/css/H-ui.1.x.patch.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/passwordStrength-min.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    $(function(){
    	$("#demoform-2").Validform({
    		tiptype:2,
    		usePlugin:{
    			datepicker:{},//日期控件校验;
    			passwordstrength:{
    				minLen:6,//设置密码长度最小值,默认为0;
    				maxLen:18,//设置密码长度最大值,默认为30;
    				trigger:function(obj,error){
    					//该表单元素的keyup和blur事件会触发该函数的执行;
    					//obj:当前表单元素jquery对象;
    					//error:所设密码是否符合验证要求,验证不能通过error为true,验证通过则为false;	
    					//console.log(error);
    					if(error){
    						obj.parent().find(".Validform_checktip").show();
    						obj.parent().find(".passwordStrength").hide();
    					}else{
    						obj.parent().find(".passwordStrength").show();
    					}
    				}
    			}
    		}
    	});
    });
    </script>
    <title>教师信息编辑页面</title>
    </head>
    <body>
    	<form action=""  class="form form-horizontal responsive" id="demoform-2">
              <div class="row cl">
                <label class="form-label col-2">姓名:</label>
                <div class="formControls col-5">
                  <input type="text" name="teacherid" id = "teacherid" value="${teacherone.teacherId}"  style="display:none;"/>
                  <input type="text" value = "${teacherone.teacherName}" class="input-text" placeholder="请输入教师姓名" name="teachername" id="teachername" datatype="s2-5" nullmsg="教师姓名不能为空" >
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">所在系:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" placeholder="请输入教师所在系" name="teachersystem" id="teachersystem" datatype="s2-10" nullmsg="请输入所在系" value = '${teacherone.teacherSystem}' >
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">电话号码:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" autocomplete="off" placeholder="手机号码" name="teacherphone" id="teacherphone" datatype="m" nullmsg="电话号码不能为空" value = '${teacherone.teacherPhone}'>
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">邮箱:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" placeholder="@" name="teacheremail" id="teacheremail" datatype="e" nullmsg="请输入邮箱!" value = '${teacherone.teacherEmail}'>
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">教师性别:</label>
                <div class="formControls skin-minimal col-5">
                  <div class="radio-box">
                    <input type="radio" id="sex-1" value = "男" name="teachersex" datatype="*" nullmsg="请选择性别!" >
                    <label for="sex-1"></label>
                  </div>
                  <div class="radio-box">
                    <input type="radio" id="sex-2" name="teachersex" value = "女">
                    <label for="sex-2"></label>
                  </div>
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <div class="col-10 col-offset-2">
                  <input class="btn btn-primary" type="button" οnclick="hehe();" id = "tijiao" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
              </div>
            </form>
    </body>
    		<script type="text/javascript">
            	if('${teacherone.teacherSex}' =="女"){
            		document.getElementById('sex-2').checked="checked";
            	}else if('${teacherone.teacherSex}' =="男") {
            		document.getElementById('sex-1').checked="checked";
            	}else{
            		
            	}
            </script>
             <script type="text/javascript">
             function hehe() {
            	 var teachername = document.getElementById("teachername").value;
                 var teachersystem = document.getElementById("teachersystem").value;
                 var teacherid = document.getElementById("teacherid").value;
                 if(teacherid==""){
                	 teacherid = 0;
                 }
                 var teacherphone = document.getElementById("teacherphone").value;
                 var teacheremail = document.getElementById("teacheremail").value;
                 var list = document.getElementsByName("teachersex");
                 var teachersex = null;
                 for(var i = 0 ; i < list.length ; i++){
        				if(list[i].checked){
        					teachersex = list[i].value;
        				}
        			}
                 if(teachername==""||teachersystem==""||teacherphone==""||teacheremail==""||teachersex==""){
                	 swal("哦豁","提交失败,请重试!","error");
                	 return;
                 }
                 if (window.XMLHttpRequest){
        	    		// code for IE7+, Firefox, Chrome, Opera, Safari
        	    	  	xmlhttp=new XMLHttpRequest();
        	    	  }
        	    	else{// code for IE6, IE5
        	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        	    	  }                                                       //创建XMLHttpRequest对象
        	    	xmlhttp.onreadystatechange=function(){
        	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
        	    		  var a = eval("("+xmlhttp.responseText+")");
        	    		  if(a.status == 1){
        	    			  swal({title:"提交成功!",text:"您已经向服务器了这条信息!",type:"success"}, 
        								function () {
        	    				  			parent.top.topManager.reloadPage();//刷新父页
        	    				  			parent.layer.closeAll();
        						    });
        	    		  }else{
        	    			  swal("哦豁","提交失败,请重试!","error");
        	    		  }
        	    	    }
        	    	  }	;											//服务器响应时完成相应操作
        	    	xmlhttp.open("post","teacheradd?teacherName="+encodeURI(encodeURI(teachername)) + "&teacherSystem=" + encodeURI(encodeURI(teachersystem))+ "&teacherId=" + encodeURI(encodeURI(teacherid))+ "&teacherPhone=" + encodeURI(encodeURI(teacherphone))+ "&teacherEmail=" + encodeURI(encodeURI(teacheremail))+ "&teacherSex=" + encodeURI(encodeURI(teachersex)) ,true);
        	    	xmlhttp.send();
    		}
    		</script>
    </html>
    

    (4)课程模块

    SubjectBean.java

    package com.stusystem.entity;
    
    public class SubjectBean {
    private int subjectId;
    private String subjectName;
    private String teacherName;
    private String subjectCredit;
    private int page;
    public int getPage() {
    	return (page-1)*6;
    }
    public void setPage(int page) {
    	this.page = page;
    }
    public int getSubjectId() {
    	return subjectId;
    }
    public void setSubjectId(int subjectId) {
    	this.subjectId = subjectId;
    }
    public String getSubjectName() {
    	return subjectName;
    }
    public void setSubjectName(String subjectName) {
    	this.subjectName = subjectName;
    }
    public String getTeacherName() {
    	return teacherName;
    }
    public void setTeacherName(String teacherName) {
    	this.teacherName = teacherName;
    }
    public String getSubjectCredit() {
    	return subjectCredit;
    }
    public void setSubjectCredit(String subjectCredit) {
    	this.subjectCredit = subjectCredit;
    }
    }
    

    SubjectDao.java

    package com.stusystem.dao;
    
    import java.util.List;
    
    import com.stusystem.entity.SubjectBean;
    
    public interface SubjectDao {
    public List<SubjectBean> getSubject(SubjectBean subjectBean) throws Exception;
    public int getsbjpage(SubjectBean subjectBean) throws Exception;
    public SubjectBean getSubjectone(SubjectBean subjectBean) throws Exception;
    public void subjectdel(SubjectBean subjectBean) throws Exception;
    public void subjectadd(SubjectBean subjectBean) throws Exception;
    public void subjectxiugai(SubjectBean subjectBean) throws Exception;
    }
    
    

    SubjectDao.xml

    `<?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
    
    <!-- namesapce ,DAO的package路径  -->
    <mapper namespace="com.stusystem.dao.SubjectDao"> 
    	<!-- 查询所有课程信息的list -->
    	<select id="getSubject" parameterType="com.stusystem.entity.SubjectBean" resultType="com.stusystem.entity.SubjectBean">
    		<if test=" subjectName != null and subjectName != '' "> SELECT * FROM subject where subject_name = #{subjectName} limit #{page} , 6 </if>
    		<if test=" subjectName == null or subjectName == '' "> SELECT * FROM subject limit #{page} , 6 </if>
    	</select>
    	<!-- 查询课程信息共有多少页,分页处理 -->
    	<select id="getsbjpage" parameterType="com.stusystem.entity.SubjectBean" resultType="int">
    		<if test=" subjectName != null and subjectName != '' "> select count(*) from `subject` where subject_name = #{subjectName} </if>
    		<if test=" subjectName == null or subjectName == '' "> select count(*) from `subject` </if>
    	</select>
    	<!-- 查询一条课程信息  -->
    	<select id="getSubjectone" parameterType="com.stusystem.entity.SubjectBean" resultType="com.stusystem.entity.SubjectBean" >
    		SELECT * FROM subject WHERE subject_id=#{subjectId}
    	</select>
    	<!-- 删除一条课程信息 -->
    	<delete id="subjectdel" parameterType="com.stusystem.entity.SubjectBean" >
    		DELETE FROM `subject` WHERE (`subject_id`=#{subjectId})
    	</delete>
    	<!-- 修改一条课程信息  -->
    	<update id="subjectxiugai" parameterType="com.stusystem.entity.SubjectBean">
    		UPDATE subject SET subject_name=#{subjectName}, teacher_name=#{teacherName}, subject_credit=#{subjectCredit} WHERE (subject_id=#{subjectId})
    	</update>
    	<!-- 添加一条课程信息  -->
    	<insert id="subjectadd" parameterType="com.stusystem.entity.SubjectBean">
    		INSERT INTO `subject` (`subject_name`, `teacher_name`, `subject_credit`) VALUES (#{subjectName},#{teacherName},#{subjectCredit})
    	</insert>
    </mapper>
    

    ScoreController.java

    package com.stusystem.controller;
    
    import java.io.IOException;
    import java.net.URLDecoder;
    import java.util.List;
    
    import javax.servlet.http.HttpServletResponse;
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    
    import com.stusystem.dao.SubjectDao;
    import com.stusystem.entity.SubjectBean;
    
    @Controller
    @RequestMapping("subject")
    public class SubjectController {
    	@Autowired
    	SubjectDao subjectDao;
    	@RequestMapping("/subjectlist")
    	public String getSubject(SubjectBean sbj,Model model) throws Exception{
    		if(sbj.getSubjectName()!=null&&sbj.getSubjectName()!=""){
    			sbj.setSubjectName(URLDecoder.decode(sbj.getSubjectName(), "UTF-8"));
    		}
    		List<SubjectBean> subjectlist=subjectDao.getSubject(sbj);
    		int sbjpage=subjectDao.getsbjpage(sbj);
    		model.addAttribute("subjectlist",subjectlist);
    		model.addAttribute("sbjpage",sbjpage);
    		model.addAttribute("subjectName", sbj.getSubjectName());
    		return "subjectlist";
    	}
        
    	@RequestMapping("/subjecteditor")
    	public String studenteditor(SubjectBean sbj,Model model) throws Exception {
    		if(sbj.getSubjectId()==0){
    			return "subjecteditor";
    		}else{
    			SubjectBean subjectone = subjectDao.getSubjectone(sbj);
    			model.addAttribute("subjectone", subjectone);//如subjecteditor.jsp中可用subjectone.sybjectId来获取课程号
    			return "subjecteditor";
    		}
    	}
    	//删除一条课程信息
    	@RequestMapping(value = {"/subjectdel"})
    	public void subjectdel(SubjectBean sbj,HttpServletResponse response) throws IOException {
    		int a = 0;
    		try {
    			subjectDao.subjectdel(sbj);
    		} catch (Exception e) {
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}else{
    		}
    	}
    	//添加一条课程信息
    	@RequestMapping(value = {"/subjectadd"})
    	public void subjectadd(SubjectBean sbj,HttpServletResponse response) throws IOException{
    		int a = 0;
    		try {
    			if(sbj.getSubjectId()==0){
    				sbj.setSubjectName(URLDecoder.decode(sbj.getSubjectName(), "UTF-8"));
    				sbj.setTeacherName(URLDecoder.decode(sbj.getTeacherName(), "UTF-8"));
    				subjectDao.subjectadd(sbj);
    			}else{
    				sbj.setSubjectName(URLDecoder.decode(sbj.getSubjectName(), "UTF-8"));
    				sbj.setTeacherName(URLDecoder.decode(sbj.getTeacherName(), "UTF-8"));
    				subjectDao.subjectxiugai(sbj);
    			}
    		} catch (Exception e) {
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}else{
    		}
    	}
    }
    

    subjectlist.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    function del(studentid) {
    	 swal({
    	        title: "您确定要删除这条信息吗",
    	        text: "删除后将无法恢复,请谨慎操作!",
    	        type: "warning",
    	        showCancelButton: true,
    	        confirmButtonColor: "#DD6B55",
    	        confirmButtonText: "删除",
    	        closeOnConfirm: false
    	    }, function () {
    	    	if (window.XMLHttpRequest){
    	    		// code for IE7+, Firefox, Chrome, Opera, Safari
    	    	  	xmlhttp=new XMLHttpRequest();
    	    	  }
    	    	else{// code for IE6, IE5
    	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    	    	  }                                                       //创建XMLHttpRequest对象
    	    	xmlhttp.onreadystatechange=function(){
    	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
    	    		  var a = eval("("+xmlhttp.responseText+")");
    	    		  if(a.status== 1){
    	    			  swal({title:"删除成功!",text:"您已经永久删除了这条信息!",type:"success"}, 
    								function () {
    	    				  			var b = '${stupage}' ;
    	    				  			b = Math.ceil(b/6) ;
    	    				  			location.href = "studentlist?page=" + b;
    						    });
    	    		  }else{
    	    			  swal("哦豁","删除失败,请重试!","error");
    	    		  }
    	    	    }
    	    	  }	;											//服务器响应时完成相应操作
    	    	xmlhttp.open("post","studentdel?stuId="+studentid,true);
    	    	xmlhttp.send();
    	    });
    }
    </script>
    <title>学生列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    		<div class="row">
    		  <div class="col-md-3">
    		  	<div class="input-group">
    		      <input type="text" class="form-control" placeholder="输入学生姓名搜索" id = "sousuo" value = "${studentname}">
    		      <span class="input-group-btn">
    		        <button class="btn btn-default" type="button" onclick="sousuo();">Go!</button>
    		      </span>
    	    	</div>
    		  </div>
    		  <div class="col-md-3"><button type="button" class="btn btn-default" onclick="tianjia();">添加+</button></div>
    		  <div class="col-md-6"></div>
    		</div>
    		
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>学号</th>
    			<th>学生姓名</th>
    			<th>学生性别</th>
    			<th>所在系</th>
    			<th>班级</th>
    			<th>电话号码</th>
    			<th>操作</th>
    		</tr>
    		<c:forEach items="${studentlist}" var="stu">
    			<tr>
    				<td>${stu.stuId}</td>
    				<td>${stu.stuName}</td>
    				<td>${stu.stuSex}</td>
    				<td>${stu.stuSystem}</td>
    				<td>${stu.stuClass}</td>
    				<td>${stu.stuPhone}</td>
    				<td><button type="button" class="btn btn-info btn-xs" onclick="bianji(${stu.stuId});" ><i class="iconfont">&#xe66e;</i>&nbsp;编辑</button>&nbsp;&nbsp;<button type="button" onclick="del(${stu.stuId});" class="btn btn-danger btn-xs"><i class="iconfont">&#xe614;</i>&nbsp;删除</button></td>
    			</tr>
    		</c:forEach>
    	</table>
    	<div id="page11" style="margin-top:5px; text-align:center;"></div>
    </body>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
    laypage({
        cont: 'page11',
        pages: Math.ceil("${stupage}"/6), //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18 length
        skip: true, //是否开启跳页
        skin: '#6699FF',
        curr: function(){ //通过url获取当前页,也可以同上(pages)方式获取
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;
        }(), 
        jump: function(e, first){ //触发分页后的回调
            if(!first){ //一定要加此判断,否则初始时会无限刷新
            	var studengtname = document.getElementById("sousuo").value;
                location.href = '?page='+e.curr + '&stuName=' + encodeURI(encodeURI(studengtname));
            }
        }
    });
    </script>
    <script type="text/javascript">
    	function bianji(studentId) {
    		layer.open({
    		    type: 2,
    		    title: '学生信息编辑页面',
    		    shadeClose: true,
    		    shade: 0.8,
    		    shift: 1, //0-6的动画形式,-1不开启
    		    area: ['800px', '80%'],
    		    content: 'studenteditor?stuId='+ studentId
    		});
    	}
    	 function tianjia() {
    		 layer.open({
    			    type: 2,
    			    title: '学生信息添加页面',
    			    shadeClose: true,
    			    shade: 0.8,
    			    shift: 1, //0-6的动画形式,-1不开启
    			    area: ['800px', '80%'],
    			    content: 'studenteditor?stuId=0'
    			}); 
    	}
    </script>
    <script type="text/javascript">
    	function sousuo() {
    		var studentname = document.getElementById("sousuo").value;
    		location.href = 'studentlist?stuName='+ encodeURI(encodeURI(studentname)) + '&page=1' ;
    	}
    </script>
    </html>
    

    subjectone.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <title>学生信息列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生个人信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>学号</th>
    			<th>学生姓名</th>
    			<th>学生性别</th>
    			<th>所在系</th>
    			<th>班级</th>
    			<th>电话号码</th>
    			<th>操作</th>
    		</tr>
    		<tr>
    				<td>${stuone.stuId}</td>
    				<td>${stuone.stuName}</td>
    				<td>${stuone.stuSex}</td>
    				<td>${stuone.stuSystem}</td>
    				<td>${stuone.stuClass}</td>
    				<td>${stuone.stuPhone}</td>
    				<td>
    					<button id = "xiugai" type="button" class="btn btn-info btn-xs" οnclick="xiugai();" >
    						<i class="iconfont">&#xe66e;</i>
    						&nbsp;编辑
    					</button>
    				</td>
    		</tr>
    	</table>
    </body>
    <script type="text/javascript">
    function xiugai() {
    	layer.open({
    	    type: 2,
    	    title: '学生个人信息修改页面',
    	    shadeClose: true,
    	    shade: 0.8,
    	    shift: 1, //0-6的动画形式,-1不开启
    	    area: ['800px', '80%'],
    	    content: 'studenteditor?stuId='+"${stuone.stuId}"
    	}); 
    }
    </script>
    </html>
    

    subjecteditoe.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="<%=request.getContextPath()%>/css/H-ui.css" rel="stylesheet" type="text/css" />
    <link href="<%=request.getContextPath()%>/css/H-ui.1.x.patch.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/passwordStrength-min.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    $(function(){
    	$("#demoform-2").Validform({
    		tiptype:2,
    		usePlugin:{
    			datepicker:{},//日期控件校验;
    			passwordstrength:{
    				minLen:6,//设置密码长度最小值,默认为0;
    				maxLen:18,//设置密码长度最大值,默认为30;
    				trigger:function(obj,error){
    					//该表单元素的keyup和blur事件会触发该函数的执行;
    					//obj:当前表单元素jquery对象;
    					//error:所设密码是否符合验证要求,验证不能通过error为true,验证通过则为false;	
    					//console.log(error);
    					if(error){
    						obj.parent().find(".Validform_checktip").show();
    						obj.parent().find(".passwordStrength").hide();
    					}else{
    						obj.parent().find(".passwordStrength").show();
    					}
    				}
    			}
    		}
    	});
    });
    </script>
    <title>教师信息编辑页面</title>
    </head>
    <body>
    	<form action="" class="form form-horizontal responsive" id="demoform-2">
              <div class="row cl">
                <label class="form-label col-2">课程名字:</label>
                <div class="formControls col-5">
                	<input type="text" name="subjectid" id = "subjectid" value="${subjectone.subjectId}"  style="display:none;"/>
                  <input type="text" class="input-text" placeholder="请输入课程名字" name="subjectname" id="subjectname" value="${subjectone.subjectName}" datatype="s2-10" nullmsg="课程名字不能为空">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">授课老师:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" placeholder="请输入授课老师" name="teachername" id="teachername" value="${subjectone.teacherName}" datatype="s2-5" nullmsg="授课老师不能为空">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <label class="form-label col-2">学分:</label>
                <div class="formControls col-5">
                  <input type="text" class="input-text" autocomplete="off" placeholder="请输入学分" name="subjectcredit" id="subjectcredit" value="${subjectone.subjectCredit}" datatype="n" nullmsg="学分不能为空">
                </div>
                <div class="col-5">
                </div>
              </div>
              <div class="row cl">
                <div class="col-10 col-offset-2">
                  <input class="btn btn-primary" type="button" onclick="hehe();" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
              </div>
            </form>
    </body>
    <script type="text/javascript">
             function hehe() {
            	 var subjectid = document.getElementById("subjectid").value;
            	 if(subjectid==""){
            		 subjectid = 0;
            	 }
                 var subjectname = document.getElementById("subjectname").value;
                 var teachername = document.getElementById("teachername").value;
                 var subjectcredit = document.getElementById("subjectcredit").value;
                 if(subjectname==""||teachername==""||subjectcredit==""){
                	 swal("哦豁","提交失败,请重试!","error");
                	 return;
                 }
                 if (window.XMLHttpRequest){
        	    		// code for IE7+, Firefox, Chrome, Opera, Safari
        	    	  	xmlhttp=new XMLHttpRequest();
        	    	  }
        	    	else{// code for IE6, IE5
        	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        	    	  }                                                       //创建XMLHttpRequest对象
        	    	xmlhttp.onreadystatechange=function(){
        	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
        	    		  var a = eval("("+xmlhttp.responseText+")");
        	    		  if(a.status == 1){
        	    			  swal({title:"提交成功!",text:"您已经向服务器了这条信息!",type:"success"}, 
        								function () {
        	    				  			parent.top.topManager.reloadPage();
        	    				  			parent.layer.closeAll();
        						    });
        	    		  }else{
        	    			  swal("哦豁","提交失败,请重试!","error");
        	    		  }
        	    	    }
        	    	  }	;											//服务器响应时完成相应操作
        	    	xmlhttp.open("post","subjectadd?subjectId="+encodeURI(encodeURI(subjectid)) + "&subjectName=" + encodeURI(encodeURI(subjectname))+ "&teacherName=" + encodeURI(encodeURI(teachername))+ "&subjectCredit=" + encodeURI(encodeURI(subjectcredit)),true);
        	    	xmlhttp.send();
    		}
    </script>
    </html>
    

    (5)分数和选课模块

    ScoreBean.java

    package com.stusystem.entity;
    
    import org.apache.ibatis.type.Alias;
    import org.springframework.stereotype.Component;
    @Alias("scoreBean")
    @Component
    public class ScoreBean {
    private int scoreId;
    private int studentId;
    private String subjectName;
    private String studentName;
    private String score;
    private int subjectId;
    private String teacherName;
    private String subjectCredit;
    private int page;
    public int getPage() {
    	return (page-1)*6;
    }
    public void setPage(int page) {
    	this.page = page;
    }
    public String getSubjectCredit() {
    	return subjectCredit;
    }
    public void setSubjectCredit(String subjectCredit) {
    	this.subjectCredit = subjectCredit;
    }
    public String getTeacherName() {
    	return teacherName;
    }
    public void setTeacherName(String teacherName) {
    	this.teacherName = teacherName;
    }
    public int getScoreId() {
    	return scoreId;
    }
    public void setScoreId(int scoreId) {
    	this.scoreId = scoreId;
    }
    public int getStudentId() {
    	return studentId;
    }
    public void setStudentId(int studentId) {
    	this.studentId = studentId;
    }
    public String getSubjectName() {
    	return subjectName;
    }
    public void setSubjectName(String subjectName) {
    	this.subjectName = subjectName;
    }
    public String getStudentName() {
    	return studentName;
    }
    public void setStudentName(String studentName) {
    	this.studentName = studentName;
    }
    public String getScore() {
    	return score;
    }
    public void setScore(String score) {
    	this.score = score;
    }
    public int getSubjectId() {
    	return subjectId;
    }
    public void setSubjectId(int subjectId) {
    	this.subjectId = subjectId;
    }
    }
    

    ScoreDao.java

    package com.stusystem.dao;
    
    import java.util.List;
    
    import com.stusystem.entity.ScoreBean;
    import com.stusystem.entity.StudentBean;
    import com.stusystem.entity.SubjectBean;
    
    public interface ScoreDao {
    public List<ScoreBean> getscorelist(StudentBean studentBean) throws Exception;
    public void scoreadd(ScoreBean score) throws Exception;
    public List<SubjectBean> getSubject(ScoreBean score) throws Exception;
    //已选课程信息的分页处理
    public int getsbjpage(ScoreBean score)throws Exception;
    //添加一个学生的选课信息
    public void setsubject(ScoreBean score)throws Exception;
    //查询一个学生已选课程信息的list
    public List<SubjectBean> yxsubjectlist(ScoreBean score) throws Exception;
    //删除一条已选课程
    public void delyxkc(ScoreBean score) throws Exception;
    //查询一个学生的已选课程成绩和课程信息的list
    public List<ScoreBean> getscoreonelist(ScoreBean score)throws Exception;
    }
    
    

    ScoreDao.xml

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 
    
    <!-- namesapce ,DAO的package路径  -->
    <mapper namespace="com.stusystem.dao.ScoreDao"> 
    	<!-- 多表查询查询出一个学生的成绩和其他信息保存到一个score对象中  -->
    	<select id="getscorelist" parameterType="com.stusystem.entity.StudentBean" resultType="scoreBean">
    		SELECT score.score, `subject`.subject_name, score.score_id FROM score , `subject` WHERE score.subject_id = `subject`.subject_id AND score.student_id = #{stuId} 
    	</select>
    	<!-- 添加一个学生的成绩  -->
    	<update id="scoreadd" parameterType="scoreBean">
    		UPDATE score SET score=#{score} WHERE score_id=#{scoreId}
    	</update>
    	<!--查询一个学生的未选选课程信息list -->
    	<select id="getSubject" parameterType="scoreBean" resultType="com.stusystem.entity.SubjectBean">
    		<if test=" subjectName != null and subjectName != '' ">select * from `subject` where subject_name = #{subjectName} and subject_id not in (select subject_id from score where student_id = #{studentId} ) limit #{page} ,6 </if>
    		<if test=" subjectName == null or subjectName == '' "> SELECT * FROM subject where subject_id not in (select subject_id from score where student_id = #{studentId} ) limit #{page} ,6 </if>
    	</select>
    	<!-- 已选课程信息的分页处理  -->
    	<select id="getsbjpage" parameterType="scoreBean" resultType="int">
    		<if test=" subjectName != null and subjectName != '' ">select count(*) from `subject` where subject_name = #{subjectName} and subject_id not in (select subject_id from score where student_id = #{studentId} )</if>
    		<if test=" subjectName == null or subjectName == '' "> select count(*) from subject where subject_id not in (select subject_id from score where student_id = #{studentId} ) </if>
    	</select>
    	<!--添加一个学生的选课信息  -->
    	<insert id="setsubject" parameterType="scoreBean">
    		INSERT INTO `score` (`student_id`, `subject_id`) VALUES (#{studentId},#{subjectId})
    	</insert>
    	<!-- 查询一个学生已选课程信息的list-->
    	<select id="yxsubjectlist" parameterType="scoreBean" resultType="com.stusystem.entity.SubjectBean">
    		SELECT * FROM subject where subject_id in (select subject_id from score where student_id = #{studentId} )
    	</select>
    	<!-- 删除一条已选课程 -->
    	<delete id="delyxkc" parameterType="scoreBean">
    		DELETE FROM `score` WHERE `student_id`=#{studentId} and subject_id = #{subjectId} 
    	</delete>
    	<!-- 查询一个学生的已选课程成绩和课程信息的list-->
    	<select id="getscoreonelist" parameterType="scoreBean" resultType="scoreBean"> 
    		SELECT * FROM score , `subject` WHERE score.subject_id = `subject`.subject_id AND score.student_id = #{studentId} 
    	</select>
    </mapper>
    

    ScoreController.java

    package com.stusystem.controller;
    
    import java.io.IOException;
    import java.net.URLDecoder;
    import java.util.List;
    
    import javax.servlet.http.HttpServletResponse;
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Controller;
    import org.springframework.ui.Model;
    import org.springframework.web.bind.annotation.RequestMapping;
    
    import com.stusystem.dao.ScoreDao;
    import com.stusystem.dao.StudentDao;
    import com.stusystem.entity.ScoreBean;
    import com.stusystem.entity.StudentBean;
    import com.stusystem.entity.SubjectBean;
    @Controller
    @RequestMapping(value = "score")
    public class ScoreController {
    	@Autowired
    	private StudentDao studentDao;
    	//要注入必须要将这个类在spring容器中注册
    	@Autowired
    	private ScoreDao scoreDao;
    //	ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring-context.xml");
    //	StudentDao studentDao = (StudentDao) applicationContext.getBean("studentDao");
    //	ScoreDao scoreDao = (ScoreDao) applicationContext.getBean("scoreDao");
    	//查询出所有学生信息到学生成绩管理页面
    	@RequestMapping(value = {"/scorelist"})
    	public String getStudent(StudentBean stu,Model model) throws Exception{
    		if(stu.getStuName()!=null&&stu.getStuName()!=""){
    			stu.setStuName(URLDecoder.decode(stu.getStuName(), "UTF-8"));
    		}
    		List<StudentBean> stulist = studentDao.getStudent(stu);
    		int stupage = studentDao.getstupage(stu);
    		model.addAttribute("studentlist", stulist);
    		model.addAttribute("stupage", stupage);
    		model.addAttribute("studentname", stu.getStuName());
    		return "scorelist";
    	}
    	//查询出一个学生已选课程信息list到该学生成绩编辑页面
    	@RequestMapping(value = {"/scoreeditor"})
    	public String scoreeditor(StudentBean stu,Model model) throws Exception{
    		List<ScoreBean> scorelist = scoreDao.getscorelist(stu);
    		model.addAttribute("scorelist", scorelist);
    		if(scorelist.size()==0){
    			model.addAttribute("h1", "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这位同学还没有选课!!!");
    		}
    		return "scoreeditor";
    	}
    	//得到在编辑页面编辑好一个学生的各科成绩的list,循环存入数据库中后,在返回存入结果
    	@RequestMapping(value = {"/scoreadd"})
    	public void scoreadd(String scorelist,HttpServletResponse response) throws IOException {
    		int a = 0;
    		String[] scoreStrArray = scorelist.split(",");
    		ScoreBean score = new ScoreBean();
    		try{
    			for(int i = 0 ; i < scoreStrArray.length ; i+=2 ){
    				score.setScore(scoreStrArray[i]);
    				score.setScoreId(Integer.parseInt(scoreStrArray[i+1]));
    				scoreDao.scoreadd(score);
    			}
    		}catch (Exception e){
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}
    	}
    	//查询出一个学生的未选课程的信息list
    	@RequestMapping(value = {"/scoreone"})
    	public String scoreone(ScoreBean scorebean,Model model)throws Exception{
    		String subjectname =scorebean.getSubjectName();
    		if (subjectname != null && !"".equals(subjectname)) {
    			subjectname= URLDecoder.decode(subjectname, "UTF-8");
    			scorebean.setSubjectName(URLDecoder.decode(subjectname, "UTF-8")) ;
    		}
    		List<SubjectBean> subjectlist = scoreDao.getSubject(scorebean);
    		int sbjpage = scoreDao.getsbjpage(scorebean);
    		model.addAttribute("sbjpage", sbjpage);
    		model.addAttribute("subjectlist", subjectlist);
    		model.addAttribute("subjectname", subjectname);
    		return "scoreone";
    	}
    	//添加一个学生的选课记录
    	@RequestMapping(value = {"/xuanke"})
    	public void xuanke(HttpServletResponse response,ScoreBean scorebean) throws IOException{
    		int a = 0;
    		try {
    			scoreDao.setsubject(scorebean);
    		} catch (Exception e) {
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}
    	}
    	//返回一个学生的已选课程的list到已选课程编辑页面
    	@RequestMapping(value = {"/xsyxkc"})
    	public String xsyxkc(ScoreBean scorebean,Model model) throws Exception{
    		List<SubjectBean> yxsubjectlist = scoreDao.yxsubjectlist(scorebean);
    		model.addAttribute("yxsubjectlist", yxsubjectlist);
    		return "xsyxkc";
    	}
    	//删除一个学生的已选课程
    	@RequestMapping(value = {"/yxkcdel"})
    	public void yxkcdel(ScoreBean scorebean,HttpServletResponse response) throws IOException{
    		int a = 0;
    		try {
    			scoreDao.delyxkc(scorebean);
    		} catch (Exception e) {
    			a=a+1;
    			response.getWriter().println("{'status':'0'}");
    			e.printStackTrace();
    		}
    		if(a==0){
    			response.getWriter().println("{'status':'1'}");
    		}
    	}
    	//查询出一个学生的已选课程成绩信息和相应成绩
    	@RequestMapping(value = {"/xsgrcjcx"})
    	public String xsgrcjcx(ScoreBean scorebean,Model model)throws Exception{
    		List<ScoreBean> scoreonelist = scoreDao.getscoreonelist(scorebean);
    		model.addAttribute("scoreonelist", scoreonelist);
    		if(scoreonelist.size()==0){
    			model.addAttribute("h1", "你还没有选课!!");
    		}
    		return "xsgrcjcx";
    	}
    }
    

    scorelist.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <title>学生列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生成绩管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    		<div class="row">
    		  <div class="col-md-3">
    		  	<div class="input-group">
    		      <input type="text" class="form-control" placeholder="输入学生姓名搜索" id = "sousuo" value = "${studentname}">
    		      <span class="input-group-btn">
    		        <button class="btn btn-default" type="button" onclick="sousuo();">Go!</button>
    		      </span>
    	    	</div>
    		  </div>
    		  <div class="col-md-3"></div>
    		  <div class="col-md-6"></div>
    		</div>
    		
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>学号</th>
    			<th>学生姓名</th>
    			<th>学生性别</th>
    			<th>所在系</th>
    			<th>班级</th>
    			<th>电话号码</th>
    			<th>操作</th>
    		</tr>
    		<c:forEach items="${studentlist}" var="stu">
    			<tr>
    				<td>${stu.stuId}</td>
    				<td>${stu.stuName}</td>
    				<td>${stu.stuSex}</td>
    				<td>${stu.stuSystem}</td>
    				<td>${stu.stuClass}</td>
    				<td>${stu.stuPhone}</td>
    				<td><button type="button" onclick="bianji(${stu.stuId});" class="btn btn-info btn-xs"><i class="iconfont">&#xe66e;</i>&nbsp;编辑该学生成绩</button></td>
    			</tr>
    		</c:forEach>
    	</table>
    	<div id="page11" style="margin-top:5px; text-align:center;"></div>
    </body>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
    laypage({
        cont: 'page11',
        pages: Math.ceil("${stupage}"/6), //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18 length
        skip: true, //是否开启跳页
        skin: '#6699FF',
        curr: function(){ //通过url获取当前页,也可以同上(pages)方式获取
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;
        }(), 
        jump: function(e, first){ //触发分页后的回调
            if(!first){ //一定要加此判断,否则初始时会无限刷新
            	var studengtname = document.getElementById("sousuo").value;
                location.href = '?page='+e.curr + '&stuName=' + encodeURI(encodeURI(studengtname));
            }
        }
    });
    </script>
    <script type="text/javascript">
    	function bianji(studentid) {
    		layer.open({
    		    type: 2,
    		    title: '学生成绩编辑页面',
    		    shadeClose: true,
    		    shade: 0.8,
    		    shift: 1, //0-6的动画形式,-1不开启
    		    area: ['800px', '80%'],
    		    content: 'scoreeditor?stuId='+studentid
    		});
    	}
    </script>
    <script type="text/javascript">
    	function sousuo() {
    		var studentname = document.getElementById("sousuo").value;
    		location.href = 'scorelist?stuName='+ encodeURI(encodeURI(studentname)) + '&page=1';
    	}
    </script>
    </html>
    

    scoreone.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    function xuanze(subjectid,studentid) {
    	swal({
    	    title: "您确定要选择本课程吗?",
    	    text: "请选择与本人专业相关的课程!!",
    	    type: "warning",
    	    showCancelButton: true,
    	    confirmButtonColor: "#DD6B55",
    	    confirmButtonText: "选择",
    	    closeOnConfirm: false
    	}, function () {
    		if (window.XMLHttpRequest){
        		// code for IE7+, Firefox, Chrome, Opera, Safari
        	  	xmlhttp=new XMLHttpRequest();
        	  }
        	else{// code for IE6, IE5
        	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        	  }                                                       //创建XMLHttpRequest对象
        	xmlhttp.onreadystatechange=function(){
        	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
        		  var a = eval("("+xmlhttp.responseText+")");
        		  if(a.status== 1){
        			  swal({title:"选择成功!",text:"您已经成功选择了本课程!",type:"success"}, 
    							function () {
    					  			location.href = "scoreone?page=1"+"&studentId="+'${userbean.userId}';
    					    });
        		  }else{
        			  swal("哦豁","选择失败,请重试!","error");
        		  }
        	    }
        	  }	;											//服务器响应时完成相应操作
        	xmlhttp.open("post","xuanke?subjectId="+ subjectid + "&studentId=" + studentid ,true);
        	xmlhttp.send();
    	});
    }
    </script>
    <title>课程列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生个人课程信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    		<div class="row">
    		  <div class="col-md-3">
    		  	<div class="input-group">
    		      <input type="text" class="form-control" placeholder="输入课程名搜索" id = "sousuo" value = "${subjectname}">
    		      <span class="input-group-btn">
    		        <button class="btn btn-default" type="button" onclick="sousuo();">Go!</button>
    		      </span>
    	    	</div>
    		  </div>
    		  <div class="col-md-3"><button type="button" class="btn btn-default" onclick="yxkc();">查看已选择课程</button></div>
    		  <div class="col-md-6"></div>
    		</div>
    		
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>课程编号</th>
    			<th>课程名字</th>
    			<th>授课老师</th>
    			<th>课程学分</th>
    			<th>操作</th>
    		</tr>
    		<c:forEach items="${subjectlist}" var="sbj">
    		<tr>
    			<td>${sbj.subjectId}</td>
    			<td>${sbj.subjectName}</td>
    			<td>${sbj.teacherName}</td>
    			<td>${sbj.subjectCredit}</td>
    				<td>
    					<button id = "${sbj.subjectId}" type="button" class="btn btn-info btn-xs" οnclick="xuanze(${sbj.subjectId},${userbean.userId});" >
    						<i class="iconfont">&#xe66e;</i>
    						&nbsp;添加本课程
    					</button>
    				</td>
    		</tr>
    		</c:forEach>
    	</table>
    	<div id="page11" style="margin-top:5px; text-align:center;"></div>
    </body>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
    var aa = Math.ceil("${sbjpage}"/6);
    laypage({
        cont: 'page11',
        pages: aa, //可以叫服务端把总页数放在某一个隐藏域,再获取。假设我们获取到的是18 length
        skip: true, //是否开启跳页
        skin: '#6699FF',
        curr: function(){ //通过url获取当前页,也可以同上(pages)方式获取
            var page = location.search.match(/page=(\d+)/);
            return page ? page[1] : 1;
        }(), 
        jump: function(e, first){ //触发分页后的回调
            if(!first){ //一定要加此判断,否则初始时会无限刷新
            	var subjectname = document.getElementById("sousuo").value;
                location.href = '?page='+e.curr + '&subjectName=' + encodeURI(encodeURI(subjectname)+'&studentId=' + '${userbean.userId}');
            }
        }
    });
    </script>
    <script type="text/javascript">
    	function sousuo() {
    		var subjectname = document.getElementById("sousuo").value;
    		location.href = 'scoreone?subjectName='+ encodeURI(encodeURI(subjectname)) + '&page=1' + '&studentId=' + '${userbean.userId}' ;
    	}
    	function yxkc() {
    		layer.open({
    		    type: 2,
    		    title: '学生已选课程信息页面',
    		    shadeClose: true,
    		    shade: 0.8,
    		    shift: 1, //0-6的动画形式,-1不开启
    		    area: ['800px', '80%'],
    		    content: 'xsyxkc?studentId='+"${userbean.userId}"
    		}); 
    	}
    </script>
    </html>
    

    scoreeditor,jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link href="<%=request.getContextPath()%>/css/H-ui.css" rel="stylesheet" type="text/css" />
    <link href="<%=request.getContextPath()%>/css/H-ui.1.x.patch.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/lib/Validform/5.3.2/passwordStrength-min.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript">
    $(function(){
    	$("#demoform-2").Validform({
    		tiptype:2,
    		usePlugin:{
    			datepicker:{},//日期控件校验;
    			passwordstrength:{
    				minLen:6,//设置密码长度最小值,默认为0;
    				maxLen:18,//设置密码长度最大值,默认为30;
    				trigger:function(obj,error){
    					//该表单元素的keyup和blur事件会触发该函数的执行;
    					//obj:当前表单元素jquery对象;
    					//error:所设密码是否符合验证要求,验证不能通过error为true,验证通过则为false;	
    					//console.log(error);
    					if(error){
    						obj.parent().find(".Validform_checktip").show();
    						obj.parent().find(".passwordStrength").hide();
    					}else{
    						obj.parent().find(".passwordStrength").show();
    					}
    				}
    			}
    		}
    	});
    });
    </script>
    <title>学生成绩编辑页面</title>
    </head>
    <body>
    	<div class="row" id = "demo">
    	  <div class="col-md-4"><h1>${h1}</h1></div>
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"></div>
    	</div>
    	<form action=""  class="form form-horizontal responsive" id="demoform-2">
    	<c:forEach items="${scorelist}" var="sco">
              <div class="row cl">
                <label class="form-label col-3">${sco.subjectName}:</label>
                <div class="formControls col-5">
                  <input type="text" name="scoreid" id = "scoreid" value="${sco.scoreId}"  style="display:none;"/>
                  <input type="text" value = "${sco.score}" class="input-text" placeholder="请输入${sco.subjectName}成绩" name="scorelist" datatype="n1-3" nullmsg="成绩不能为空,可以为零" >
                </div>
                <div class="col-4">
                </div>
              </div>
        </c:forEach>
              <div class="row cl">
                <div class="col-10 col-offset-2">
                  <input class="btn btn-primary" type="button" οnclick="hehe();" id = "tijiao" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                </div>
              </div>
            </form>
    </body>
             <script type="text/javascript">
             var list = document.getElementsByName("scorelist");
             if(list.length==0){
            	 $("input").hide();
             }
             function hehe() {
            	 var list1 = document.getElementsByName("scorelist");
            	 var list2 = document.getElementsByName("scoreid");
            	 var scorelist = [list1.length];
            	 for(var i = 0 ;i < list1.length ; i++){
             		 scorelist[i] = [list1[i].value,list2[i].value];
            	 }
                 if (window.XMLHttpRequest){
        	    		// code for IE7+, Firefox, Chrome, Opera, Safari
        	    	  	xmlhttp=new XMLHttpRequest();
        	    	  }
        	    	else{// code for IE6, IE5
        	    	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        	    	  }                                                       //创建XMLHttpRequest对象
        	    	xmlhttp.onreadystatechange=function(){
        	    	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
        	    		 var a = eval("("+xmlhttp.responseText+")");
        	    		 if(a.status == 1){
        	    			  swal({title:"提交成功!",text:"您已经向服务器了这条信息!",type:"success"}, 
        								function () {
        	    				  			parent.top.topManager.reloadPage();
        	    				  			parent.layer.closeAll();
        						    });
        	    		  }else{
        	    			  swal("哦豁","提交失败,请重试!","error");
        	    		  } 
        	    	    } 
        	    	  }	;											//服务器响应时完成相应操作
        	    	xmlhttp.open("post","scoreadd?scorelist="+scorelist ,true);
        	    	xmlhttp.send();
    		}
    		</script>
    </html>
    

    xsgrcjcx.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <title>课程列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生个人课程信息管理表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    	<br/>
    	<table class="table table-hover" id = 'table'>
    		<tr class="info">
    			<th>课程编号</th>
    			<th>课程名字</th>
    			<th>授课老师</th>
    			<th>课程学分</th>
    			<th>分数</th>
    		</tr>
    		<c:forEach items="${scoreonelist}" var="sco">
    		<tr>
    			<td>${sco.subjectId}</td>
    			<td>${sco.subjectName}</td>
    			<td>${sco.teacherName}</td>
    			<td>${sco.subjectCredit}</td>
    			<td>${sco.score}</td>
    		</tr>
    		</c:forEach>
    	</table>
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h1>${h1}</h1></div>
    	  <div class="col-md-4"></div>
    	</div>
    	<div id="page11" style="margin-top:5px; text-align:center;"></div>
    </body>
    </html>
    

    xsyxkc.jsp

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/sweetalert/sweetalert.css">
    <script src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script src="<%=request.getContextPath()%>/lib/layer/1.9.3/layer.js"></script>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script src="<%=request.getContextPath()%>/js/sweetalert/sweetalert.min.js"></script>
    <title>已选课程列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
    <div class="container-fluid">
    	<div class="row">
    	  <div class="col-md-4"></div>
    	  <div class="col-md-4"><h2 class="text-center">学生已选课程表</h2></div>
    	  <div class="col-md-4"></div>
    	</div>
    </div>
    	<br/>
    	<table class="table table-hover">
    		<tr class="info">
    			<th>课程编号</th>
    			<th>课程名字</th>
    			<th>授课老师</th>
    			<th>课程学分</th>
    			<th>操作</th>
    		</tr>
    		<c:forEach items="${yxsubjectlist}" var="sbj">
    		<tr>
    			<td>${sbj.subjectId}</td>
    			<td>${sbj.subjectName}</td>
    			<td>${sbj.teacherName}</td>
    			<td>${sbj.subjectCredit}</td>
    				<td>
    					<button type="button" class="btn btn-danger btn-xs" onclick="del(${sbj.subjectId},${userbean.userId});" >
    						<i class="iconfont">&#xe614;</i>
    						&nbsp;删除本课程
    					</button>
    				</td>
    		</tr>
    		</c:forEach>
    	</table>
    </body>
    <script src="<%=request.getContextPath()%>/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript">
    function del(subjectid,studentid) {
    	swal({
            title: "您确定要删除这条信息吗",
            text: "删除后将无法恢复,请谨慎操作!",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "删除",
            closeOnConfirm: false
        }, function () {
        	if (window.XMLHttpRequest){
        		// code for IE7+, Firefox, Chrome, Opera, Safari
        	  	xmlhttp=new XMLHttpRequest();
        	  }
        	else{// code for IE6, IE5
        	  	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        	  }                                                       //创建XMLHttpRequest对象
        	xmlhttp.onreadystatechange=function(){
        	  if (xmlhttp.readyState==4 && xmlhttp.status==200){
        		  var a = eval("("+xmlhttp.responseText+")");
        		  if(a.status== 1){
        			  swal({title:"删除成功!",text:"您已经永久删除了这条信息!",type:"success"}, 
    							function () {
        				  			location.href = 'xsyxkc?studentId=' + '${userbean.userId}' ;
    					    });
        		  }else{
        			  swal("哦豁","删除失败,请重试!","error");
        		  }
        	    }
        	  }	;											//服务器响应时完成相应操作
        	xmlhttp.open("post","yxkcdel?subjectId=" + subjectid + "&studentId=" + studentid,true);
        	xmlhttp.send();
        });
    }
    </script>
    </html>
    

    关于界面gy.jsp:

    <!DOCTYPE HTML>
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <html >
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script src="<%=request.getContextPath()%>/js/jquery-1.8.3.js"></script>
    <link rel="stylesheet" href="<%=request.getContextPath()%>/font/font1/LiDeBiao-Xing3.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
    <title>学生列表</title>
    </head>
    <body background="<%=request.getContextPath()%>/images/010.gif">
        <div class="row">
    	  <div class="col-md-2"></div>
    	  <div class="col-md-8">
    		  	<div  style='font-size: 60px;font-family:LiDeBiao-Xing3555757;margin-top:100px;' >    
    	      		系统开发中。。。。。。。
    	  		</div>
          </div>
    	  <div class="col-md-2"></div>
    	</div>
    </body>
    <!-- 站在巨人的肩膀上,在互联网的胯下疯狂输出!<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;——邹海清     -->
    </html>
    

    项目截图:
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    。。。。。

    具体项目源码地址:

    源码地址:https://gitee.com/z77z/StuSystem

    展开全文
  • 简历信息管理系统.zip

    2020-06-28 22:03:16
    大作用题目:简历信息管理系统的设计与实现 1、构思基于B/S的简历信息管理系统的功能需求、栏目设置、操作流程,表现方式等。 2、使用HTML、CSS、JavaScript、Servlet和JSP等技术实现简历信息管理中的增、删、改、查...
  • 其中index.html页面用于显示所有的学生信息,在首页向服务器端发送一个请求,用于显示数据的在首页,没有用到模板引擎,而用的是字符串拼接的方法。在页面的body中设置一个标签用于放服务器端返回过来的数据。其中...
  • 人事管理系统java

    2015-12-12 21:13:57
    学生提交的成果物: 分组及分工信息 组名: 组长 文档管理员 --- 会议记录 文档的收集及提交 设备管理员 --- 数据库 vss cvs 备份 测试管理员 --- 测试 组员 2 需求分析 : 输出 :1 需求文档 2 用例文档 ...
  • 中英繁学校网站系统生成静态html学校网站全站源码学校网站模板免费下载后台主要功能: 一,系统管理 修改密码 网站信息设置 导航栏目 在线客服 网站公告 数据库操作 空间统计 访问统计 友情链接 阻止SQL注入记录 幻灯...
  • 根据自己下载的企业网站后台管理系统HTML模板简单搭建一个新的学生管理信息系统,该系统只是实现简单的用户登录注册以及学生的增改查功能,其他功能还有待完善。
  • 它采用用户和用户组管理,用户组包含了用户权限的管理,您可以很方便的分配一个用户权限给老师或者学生管理某一块的功能,从而大大的提高了精品课程的管理效率。   强大的编辑器 使用简单、操作方便、功能...
  • 管理员也通过登录进入到管理员界面,可以进到系统中进行聊天,发送信息系统进行管理,对学生的发言可以进行阻止。 第三章、总体设计 3.1 系统的名称和目标 名称:基于JPS在线聊天室的开发 -----用户管理系统...
  • 此在线审阅者系统是使用PHP / PDO,HTML,CSS,Javascript(Ajax和jQuery)和AdminLTE模板开发的。 该项目是最适合知识评估的项目,适用于大专院校。 该系统提供了由老师或管理员撰写的所有评论的全面列表。 特征 ...
  • ASP在线作业系统

    热门讨论 2006-02-23 09:05:59
    并修改了版权信息在install.asp中加入了对WScript.Shell组件的检测修改了explain.asp和control/admin_explain.asp中的程序说明文档及版权2005年10月31日Bug:1.发现当一次作业学生提交多个文件时在所在老师的管理...
  • HTML网页设计结课作业——19张精美网页!

    万次阅读 多人点赞 2019-12-19 18:16:36
    临近期末,大一新生的各种考试...你想要解决的问题,在这篇博文中基本都能满足你的需求(博主之前的一个质量比较高的博客:C语言学生信息管理系统)。废话不多说,直接看效果,免得说我骗你们。 首页 首页底部 ...
  • ├─(126) 05 python全栈3 day56 创建学生信息(二).avi ├─(127) 06 python全栈3 day56 删除学生信息.avi ├─(128) day56课件代码.rar (21)\\python全栈day51-60\\python全栈s3 day57;目录中文件数:7个 ├─...
  • 第14季:客户信息管理系统 辅导课:Android全套视频-学习指导&答疑 第15季:Android Studio入门及使用技巧 第16季:玩转Android与H5互调 第17季:HTML5实战_天猫商城品牌墙 第18季:全栈开发_...
  • 系统通用模块:用户管理、频道管理、广告管理、公告管理模板管理、网站信息配置、WAP功能、RSS功能、网站统计、邮件列表、数据库管理、站内短消息、收费模块、文件上传、友情链接、调查管理、操作日志记录、缩略图...
  • 主页:项目说明,学生信息导入模板说明,视频操作手册说明 校区管理:专业设置,考核设置,月度考核标准等模块 班级管理:班级列表,班级考勤,班级考试,班级作业,班级项目,就业信息等模块 学生管理:学生档案,...
  • 实例041 打印系统环境变量信息print_r($_ENV) 73 实例042 使用可变变量输出“I Like PHP!” 73 实例043 使用转义字符输出特殊字符 74 实例044 使用常量指定PI的值计算圆的面积 75 2.2 运算符 75 实例045 自定义数字...
  • 实例041 打印系统环境变量信息print_r($_ENV) 73 实例042 使用可变变量输出“I Like PHP!” 73 实例043 使用转义字符输出特殊字符 74 实例044 使用常量指定PI的值计算圆的面积 75 2.2 运算符 75 实例045 自定义数字...
  • JSP程序设计从入门到精通.pdf

    千次下载 热门讨论 2011-04-13 13:13:58
    8.1.2 学生课绩管理系统的概要设计 201 8.1.3 学生课绩管理系统的详细设计 202 8.2 数据库设计 207 8.2.1 创建数据库 207 8.2.2 数据表设计 208 8.3 数据连接 213 8.3.1建立数据库连接 213 8.3.2 安全策略 214 8.4 ...
  • 精品课程源码

    2013-01-26 16:12:03
    它采用用户和用户组管理,用户组包含了用户权限的管理,您可以很方便的分配一个用户权限给老师或者学生管理某一块的功能,从而大大的提高了精品课程的管理效率。 ★ 强大的编辑器 使用简单、操作方便、功能...
  • 用户个人信息管理,视频的编辑(加入滤镜或者背景音乐)、上传、浏览、点赞、关注、下载、等功能。 管理员需求 毕业设计选题环节中,系统管理员的需求为:用户管理(新增用户、删除用户及用户登录系统数据的初始...
  • JSP 程序设计从入门到精通 PDF 教程

    热门讨论 2012-04-13 18:08:01
     8.1.2 学生课绩管理系统的概要设计 201  8.1.3 学生课绩管理系统的详细设计 202  8.2 数据库设计 207  8.2.1 创建数据库 207  8.2.2 数据表设计 208  8.3 数据连接 213  8.3.1建立数据库连接 213  ...
  • 03 编辑学生信息之前端功能 04 编辑学生信息之后台处理 05 以上内容总结 06 Ajax功能之dataType和traditional 第58章 01 今日内容概要 02 Ajax补充之serialize 03 分页功能介绍 04 分页基础知识 05 Django内置分页...

空空如也

空空如也

1 2 3 4 5
收藏数 83
精华内容 33
关键字:

学生信息管理系统html模板