博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SSM整合之---简单选课系统
阅读量:4692 次
发布时间:2019-06-09

本文共 39026 字,大约阅读时间需要 130 分钟。

简单选课系统

一.实体图

二.功能

三.代码实现

 

1.SSM环境搭建

(1)pom.xml

junit
junit
4.11
ch.qos.logback
logback-classic
1.1.1
mysql
mysql-connector-java
5.1.37
runtime
c3p0
c3p0
0.9.1.2
org.mybatis
mybatis
3.3.0
org.mybatis
mybatis-spring
1.2.3
taglibs
standard
1.1.2
javax.servlet
jstl
1.2
com.fasterxml.jackson.core
jackson-databind
2.5.4
javax.servlet
javax.servlet-api
3.1.0
org.springframework
spring-core
4.1.7.RELEASE
org.springframework
spring-beans
4.1.7.RELEASE
org.springframework
spring-context
4.1.7.RELEASE
org.springframework
spring-jdbc
4.1.7.RELEASE
org.springframework
spring-tx
4.1.7.RELEASE
org.springframework
spring-web
4.1.7.RELEASE
org.springframework
spring-webmvc
4.1.7.RELEASE
org.springframework
spring-test
4.1.7.RELEASE
redis.clients
jedis
2.7.3
com.dyuproject.protostuff
protostuff-core
1.0.8
com.dyuproject.protostuff
protostuff-runtime
1.0.8
commons-collections
commons-collections
3.2
aopalliance
aopalliance
1.0
org.aspectj
aspectjweaver
1.9.2
org.aspectj
aspectjrt
1.9.3
org.aspectj
aspectjweaver
1.9.4

 

(2)web.xml

Archetype Created Web Application
org.springframework.web.context.ContextLoaderListener
contextConfigLocation
classpath:applicationContext.xml
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
encodingFilter
/*
SpringMVC
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:springmvc.xml
1
SpringMVC
/

 

(3)applicationContext.xml

 

(4)springmvc.xml

 

2.entity

(1)Course.java

package com.ssm.entity;public class Course {    private String cno;    private String cname;    private int ctime;    private int ccredit;    private String tno;    public String getCno() {        return cno;    }    public void setCno(String cno) {        this.cno = cno;    }    public String getCname() {        return cname;    }    public void setCname(String cname) {        this.cname = cname;    }    public int getCtime() {        return ctime;    }    public void setCtime(int ctime) {        this.ctime = ctime;    }    public int getCcredit() {        return ccredit;    }    public void setCcredit(int ccredit) {        this.ccredit = ccredit;    }    public String getTno() {        return tno;    }    public void setTno(String tno) {        this.tno = tno;    }    @Override    public String toString() {        return "Course{" +                "cno='" + cno + '\'' +                ", cname='" + cname + '\'' +                ", ctime=" + ctime +                ", ccredit=" + ccredit +                ", tno='" + tno + '\'' +                '}';    }}

 

(2)Dective.java

package com.ssm.entity;public class Dective {    private int dno;    private String sno;    private String cno;    private double achievement;    public int getDno() {        return dno;    }    public void setDno(int dno) {        this.dno = dno;    }    public String getSno() {        return sno;    }    public void setSno(String sno) {        this.sno = sno;    }    public String getCno() {        return cno;    }    public void setCno(String cno) {        this.cno = cno;    }    public double getAchievement() {        return achievement;    }    public void setAchievement(double achievement) {        this.achievement = achievement;    }    @Override    public String toString() {        return "Dective{" +                "dno=" + dno +                ", sno='" + sno + '\'' +                ", cno='" + cno + '\'' +                ", achievement=" + achievement +                '}';    }}

 

(3)Student.java

package com.ssm.entity;public class Student {    private String sno;    private String sname;    private String ssex;    private String spassword;    public String getSno() {        return sno;    }    public void setSno(String sno) {        this.sno = sno;    }    public String getSname() {        return sname;    }    public void setSname(String sname) {        this.sname = sname;    }    public String getSsex() {        return ssex;    }    public void setSsex(String ssex) {        this.ssex = ssex;    }    public String getSpassword() {        return spassword;    }    public void setSpassword(String spassword) {        this.spassword = spassword;    }    @Override    public String toString() {        return "Student{" +                "sno='" + sno + '\'' +                ", sname='" + sname + '\'' +                ", ssex='" + ssex + '\'' +                ", spassword='" + spassword + '\'' +                '}';    }}

 

(4)Teacher.java

package com.ssm.entity;public class Teacher {    private String tno;    private String tname;    private String tsex;    private String tpassword;    private String ttitle;    public String getTno() {        return tno;    }    public void setTno(String tno) {        this.tno = tno;    }    public String getTname() {        return tname;    }    public void setTname(String tname) {        this.tname = tname;    }    public String getTsex() {        return tsex;    }    public void setTsex(String tsex) {        this.tsex = tsex;    }    public String getTpassword() {        return tpassword;    }    public void setTpassword(String tpassword) {        this.tpassword = tpassword;    }    public String getTtitle() {        return ttitle;    }    public void setTtitle(String ttitle) {        this.ttitle = ttitle;    }    @Override    public String toString() {        return "Teacher{" +                "tno='" + tno + '\'' +                ", tname='" + tname + '\'' +                ", tsex='" + tsex + '\'' +                ", tpassword='" + tpassword + '\'' +                ", ttitle='" + ttitle + '\'' +                '}';    }}

 

3.dao接口

(1)CourseDao.java

package com.ssm.dao;import com.ssm.entity.Course;import com.ssm.view.courseVo;import org.mybatis.spring.annotation.MapperScan;import org.springframework.stereotype.Repository;import java.util.List;@Repositorypublic interface CourseDao {    //查询所有课程信息    public List
selectCourse(); //查看可选的所有课程 public List
selectAllCourse();}

 

(2)DectiveDao.java

package com.ssm.dao;import com.ssm.entity.Dective;import com.ssm.entity.Student;import com.ssm.view.DectiveVo;import com.ssm.view.StudentVo;import com.ssm.view.courseVo;import org.apache.ibatis.annotations.Param;import org.springframework.stereotype.Repository;import java.util.List;@Repositorypublic interface DectiveDao {    //插入选课记录    public void insertDective(Dective dective);    //学生查询自己的选课记录    public List
selectMy(String sno); //删除选课记录 public void deleteDective(Dective dective); //查询成绩 public List
selectGrade(String sno); //查询选择了某个课程的所有学生信息 public List
courseStudent(String cname); //录入成绩 public void grade(@Param("sno") String sno,@Param("cno") String cno,@Param("achievement") double achievement); }

 

(3)StudentDao.java

package com.ssm.dao;import com.ssm.entity.Student;import org.apache.ibatis.annotations.Param;import org.springframework.stereotype.Repository;@Repositorypublic interface StudentDao {    //根据sno查找用户的密码,检测登录    public String selectSpassword(String sno);    //根据sno查询学生信息    public Student selectone(String sno);    //修改学生信息    public void stuUpdate(@Param("spassword") String spassword,@Param("sno") String sno);}

 

(4)TeacherDao.java

package com.ssm.dao;import com.ssm.entity.Teacher;import org.apache.ibatis.annotations.Param;import org.springframework.stereotype.Repository;import java.util.List;@Repositorypublic interface TeacherDao {    //根据tno查找用户的密码,检测登录    public String selectTpassword(String tno);    //根据tno查询老师信息    public Teacher selectte(String tno);    //修改老师信息    public void updatete(@Param("tpassword") String tpassword,@Param("tno") String tno);    //查询某个老师所教的所有课程    public List
selectMyCourse(String tno);}

 

4.dao映射文件

(1)CourseDao.xml

 

(2)DectiveDao.xml

insert into dective(sno,cno) values(#{sno},#{cno})
delete from dective where cno=#{cno} and sno=#{sno}
update dective set achievement=#{achievement} where sno=#{sno} and cno=#{cno}

 

(3)StudentDao.xml

update student set spassword=#{spassword} where sno=#{sno}

 

(4)TeacherDao.xml

update teacher set tpassword=#{tpassword} where tno=#{tno}

 

5.service接口

(1)CourseService.java

package com.ssm.service;import com.ssm.entity.Course;import com.ssm.view.courseVo;import java.util.List;public interface CourseService {    //查询所有课程信息    public List
selectCourse(); //查看可选的所有课程 public List
selectAllCourse();}

 

(2)DectiveService.java

package com.ssm.service;import com.ssm.entity.Dective;import com.ssm.entity.Student;import com.ssm.view.DectiveVo;import com.ssm.view.StudentVo;import com.ssm.view.courseVo;import org.apache.ibatis.annotations.Param;import java.util.List;public interface DectiveService {    //插入选课记录    public void insertDective(Dective dective);    //学生查询自己的选课记录    public List
selectMy(String sno); //删除选课记录 public void deleteDective(Dective dective); //查询成绩 public List
selectGrade(String sno); //查询选择了某个课程的所有学生信息 public List
courseStudent(String cname); //录入成绩 public void grade(String sno, String cno,double achievement);}

 

(3)StudentService.java

package com.ssm.service;import com.ssm.entity.Student;public interface StudentService {    //根据sno查找用户的密码,检测登录    public String selectSpassword(String sno);    //根据sno查询学生信息    public Student selectone(String sno);    //修改学生信息    public void stuUpdate(String spassword,String sno);}

 

(4)TeacherService.java

package com.ssm.service;import com.ssm.entity.Teacher;import java.util.List;public interface TeacherService {    //根据tno查找用户的密码,检测登录    public String selectTpassword(String tno);    //根据tno查询老师信息    public Teacher selectte(String tno);    //修改老师信息    public void updatete(String tpassword,String tno);    //查询某个老师所教的所有课程    public List
selectMyCourse(String tno);}

 

6.service实现类

(1)CourseServiceImpl.java

package com.ssm.service.Impl;import com.ssm.dao.CourseDao;import com.ssm.entity.Course;import com.ssm.service.CourseService;import com.ssm.view.courseVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.util.List;@Servicepublic class CourseServiceImpl implements CourseService {    @Autowired    private CourseDao courseDao;    @Override    public List
selectCourse() { return courseDao.selectCourse(); } @Override public List
selectAllCourse() { return courseDao.selectAllCourse(); }}

 

(2)DectiveServiceImpl.java

package com.ssm.service.Impl;import com.ssm.dao.DectiveDao;import com.ssm.entity.Dective;import com.ssm.entity.Student;import com.ssm.service.DectiveService;import com.ssm.view.DectiveVo;import com.ssm.view.StudentVo;import com.ssm.view.courseVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.util.List;@Servicepublic class DectiveServiceImpl implements DectiveService {    @Autowired    private DectiveDao dectiveDao;    //插入选课记录    @Override    public void insertDective(Dective dective) {        dectiveDao.insertDective(dective);    }    //学生查询自己的选课记录    @Override    public List
selectMy(String sno) { return dectiveDao.selectMy(sno); } //删除选课记录 @Override public void deleteDective(Dective dective) { dectiveDao.deleteDective(dective); } @Override public List
selectGrade(String sno) { return dectiveDao.selectGrade(sno); } @Override public List
courseStudent(String cname) { return dectiveDao.courseStudent(cname); } @Override public void grade(String sno, String cno,double achievement) { dectiveDao.grade(sno,cno,achievement); }}

 

(3)StudentServiceImpl.java

package com.ssm.service.Impl;import com.ssm.dao.StudentDao;import com.ssm.entity.Student;import com.ssm.service.StudentService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;@Servicepublic class StudentServiceImpl implements StudentService {    @Autowired    private StudentDao studentDao;    @Override    public String selectSpassword(String sno) {        return studentDao.selectSpassword(sno);    }    @Override    public Student selectone(String sno) {        return studentDao.selectone(sno);    }    @Override    public void stuUpdate(String spassword,String sno) {        studentDao.stuUpdate(spassword,sno);    }}

 

(4)TeacherServiceImpl.java

package com.ssm.service.Impl;import com.ssm.dao.TeacherDao;import com.ssm.entity.Teacher;import com.ssm.service.TeacherService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.util.List;@Servicepublic class TeacherServiceImpl implements TeacherService {    @Autowired    private TeacherDao teacherDao;    @Override    public String selectTpassword(String tno) {        return teacherDao.selectTpassword(tno);    }    @Override    public Teacher selectte(String tno) {        System.out.println(teacherDao.selectte(tno));        return teacherDao.selectte(tno);    }    @Override    public void updatete(String tpassword, String tno) {        teacherDao.updatete(tpassword,tno);    }    @Override    public List
selectMyCourse(String tno) { return teacherDao.selectMyCourse(tno); }}

 

7.controller

(1)CourseController.java

package com.ssm.controller;import com.ssm.service.Impl.CourseServiceImpl;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.servlet.ModelAndView;@Controller@RequestMapping("/courseController")public class CourseController {    @Autowired    private CourseServiceImpl courseService;    @RequestMapping("/selectCourse")    public ModelAndView selectCourse(){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("list",courseService.selectCourse());        modelAndView.setViewName("list");        return modelAndView;    }    //查询所有课程信息    @RequestMapping("/selectAllCourse")    public ModelAndView selectAllCourse(){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("courseVo",courseService.selectAllCourse());        modelAndView.setViewName("courseVo");        return modelAndView;    }    //查询所有课程信息    @RequestMapping("/selectAll")    public ModelAndView selectAll(){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("lookCourse",courseService.selectAllCourse());        modelAndView.setViewName("lookCourse");        return modelAndView;    }}

 

(2)DectiveController.java

package com.ssm.controller;import com.ssm.entity.Dective;import com.ssm.service.Impl.DectiveServiceImpl;import com.ssm.view.DectiveList;import com.ssm.view.DectiveVo;import com.ssm.view.StudentVo;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpSession;import java.util.List;@Controller@RequestMapping("/dectiveController")public class DectiveController {    @Autowired    private DectiveServiceImpl dectiveService;    //插入选课记录    @RequestMapping("/insertDective")    public String insertDective(HttpSession httpSession,String cno){        Dective dective=new Dective();        dective.setCno(cno);        dective.setSno((String)httpSession.getAttribute("sno"));        System.out.println("cno:"+cno+",sno:"+httpSession.getAttribute("sno"));        dectiveService.insertDective(dective);        return "redirect:/courseController/selectAllCourse";    }    //查询自己选过的课程    @RequestMapping("/selectMy")    public ModelAndView selectMy(HttpSession httpSession){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("selectMy",dectiveService.selectMy((String)httpSession.getAttribute("sno")));        modelAndView.setViewName("myDective");        return modelAndView;    }    //删除选课记录    @RequestMapping("/deleteDective")    public String deleteDective(HttpSession httpSession,String cno){        Dective dective=new Dective();        dective.setCno(cno);        dective.setSno((String)httpSession.getAttribute("sno"));        dectiveService.deleteDective(dective);        return "redirect:selectMy";    }    //查询成绩    @RequestMapping("selectGrade")    public ModelAndView selectGrade(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        List
list=dectiveService.selectGrade((String)session.getAttribute("sno")); System.out.println(list); modelAndView.addObject("selectGrade",list); modelAndView.setViewName("myGrade"); return modelAndView; } //查询选择了某个课程的所有学生信息 @RequestMapping("/courseStudent") public ModelAndView courseStudent(String cname){ ModelAndView modelAndView=new ModelAndView(); modelAndView.addObject("student",dectiveService.courseStudent(cname)); modelAndView.setViewName("courseStudent"); return modelAndView; } //查询选择某个课程的所有学生 @RequestMapping("/courseAllStudent") public ModelAndView courseAllStudent(String cname){ ModelAndView modelAndView=new ModelAndView(); modelAndView.addObject("studentVo",dectiveService.courseStudent(cname)); modelAndView.setViewName("grade"); return modelAndView; } //录入成绩 @RequestMapping("/grade") public String grade(DectiveList dectiveList){ System.out.println(dectiveList); for(Dective dective:dectiveList.getDectiveList()){ String sno=dective.getSno(); String cno=dective.getCno(); double achievement=dective.getAchievement(); dectiveService.grade(sno,cno,achievement); } return "redirect:/teacherController/selectAllCourse"; }}

 

(3)StudentController.java

package com.ssm.controller;import com.ssm.service.Impl.StudentServiceImpl;import org.omg.CORBA.Request;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.beans.factory.annotation.Value;import org.springframework.http.HttpRequest;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestParam;import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpSession;@Controller@RequestMapping("/studentController")public class StudentController {    @Autowired    private StudentServiceImpl studentService;    //检测登录    @RequestMapping("/selectSpassword")    public String selectSpassword(HttpSession session, String sno, String password){        String pwd=studentService.selectSpassword(sno);        System.out.println(pwd);        if(pwd.equals(password)){            session.setAttribute("sno",sno);            return "redirect:selectone";        }else{            return "index";        }    }    //根据sno查询信息    @RequestMapping("/selectone")    public ModelAndView selectone(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("student",studentService.selectone((String)session.getAttribute("sno")));        modelAndView.setViewName("student");        return modelAndView;    }    //根据sno查询信息    @RequestMapping("/selectstu")    public ModelAndView selectstu(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("student",studentService.selectone((String)session.getAttribute("sno")));        modelAndView.setViewName("studentUpdate");        return modelAndView;    }    //修改学生信息    @RequestMapping("stuUpdate")    public String stuUpdate(HttpSession session,String spassword){        System.out.println("密   码:  "+spassword);        studentService.stuUpdate(spassword,(String)session.getAttribute("sno"));        return "redirect:selectone";    }}

 

(4)TeacherController.java

package com.ssm.controller;import com.ssm.entity.Teacher;import com.ssm.service.Impl.TeacherServiceImpl;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpSession;@Controller@RequestMapping("/teacherController")public class TeacherController {    @Autowired    private TeacherServiceImpl teacherService;    //老师登录    @RequestMapping("/selectTpassword")    public String selectTpassword(HttpSession session,String tno ,String tpassword){        String pwd=teacherService.selectTpassword(tno);        System.out.println(pwd);        if(pwd.equals(tpassword)){            session.setAttribute("tno", tno);            return "redirect:selectte";        }else{            return "index";        }    }    //根据tno查询老师信息    @RequestMapping("/selectte")    public ModelAndView selectte(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        String t=(String)session.getAttribute("tno");        Teacher te=teacherService.selectte(t);        modelAndView.addObject("teacher",te);        System.out.println(te);        modelAndView.setViewName("teacher");        return modelAndView;    }    @RequestMapping("/selectone")    public ModelAndView selectone(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        String t=(String)session.getAttribute("tno");        Teacher te=teacherService.selectte(t);        modelAndView.addObject("teacher",te);        System.out.println(te);        modelAndView.setViewName("teacherUpdate");        return modelAndView;    }    //修改老师信息    @RequestMapping("/updatete")    public String updatete(HttpSession session,String tpassword){        teacherService.updatete(tpassword,(String)session.getAttribute("tno"));        return "redirect:selectte";    }    //查询老师的所有课程    @RequestMapping("/selectMyCourse")    public ModelAndView selectMyCourse(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("cname",teacherService.selectMyCourse((String)session.getAttribute("tno")));        modelAndView.setViewName("teacherCourse");        return modelAndView;    }    //查询老师的所有课程    @RequestMapping("/selectAllCourse")    public ModelAndView selectAllCourse(HttpSession session){        ModelAndView modelAndView=new ModelAndView();        modelAndView.addObject("cname",teacherService.selectMyCourse((String)session.getAttribute("tno")));        modelAndView.setViewName("courseAll");        return modelAndView;    }}

 

8.view

(1)CourseVo.java

package com.ssm.view;public class courseVo {    private String cno;    private String cname;    private int ctime;    private int tno;    private String tname;    public courseVo() {    }    public String getCno() {        return cno;    }    public void setCno(String cno) {        this.cno = cno;    }    public String getCname() {        return cname;    }    public void setCname(String cname) {        this.cname = cname;    }    public int getCtime() {        return ctime;    }    public void setCtime(int ctime) {        this.ctime = ctime;    }    public int getTno() {        return tno;    }    public void setTno(int tno) {        this.tno = tno;    }    public String getTname() {        return tname;    }    public void setTname(String tname) {        this.tname = tname;    }    public courseVo(String cno, String cname, int ctime, int tno, String tname) {        this.cno = cno;        this.cname = cname;        this.ctime = ctime;        this.tno = tno;        this.tname = tname;    }    @Override    public String toString() {        return "courseVo{" +                "cno='" + cno + '\'' +                ", cname='" + cname + '\'' +                ", ctime=" + ctime +                ", tno=" + tno +                ", tname='" + tname + '\'' +                '}';    }}

 

(2)DectiveList.java

package com.ssm.view;import com.ssm.entity.Dective;import java.util.List;public class DectiveList {    private List
dectiveList; public List
getDectiveList() { return dectiveList; } public void setDectiveList(List
dectiveList) { this.dectiveList = dectiveList; } @Override public String toString() { return "DectiveList{" + "dectiveList=" + dectiveList + '}'; }}

 

(3)DectiveVo.java

package com.ssm.view;public class DectiveVo {    private String cname;    private double achievement;    public String getCname() {        return cname;    }    public void setCname(String cname) {        this.cname = cname;    }    public double getAchievement() {        return achievement;    }    public void setAchievement(double achievement) {        this.achievement = achievement;    }    @Override    public String toString() {        return "DectiveVo1{" +                "cname='" + cname + '\'' +                ", achievement=" + achievement +                '}';    }}

 

(4)StudentVo.java

package com.ssm.view;public class StudentVo {    private String sno;    private String sname;    private String ssex;    private String spassword;    private String cno;    private double achievement;    public String getSno() {        return sno;    }    public void setSno(String sno) {        this.sno = sno;    }    public String getSname() {        return sname;    }    public void setSname(String sname) {        this.sname = sname;    }    public String getSsex() {        return ssex;    }    public void setSsex(String ssex) {        this.ssex = ssex;    }    public String getSpassword() {        return spassword;    }    public void setSpassword(String spassword) {        this.spassword = spassword;    }    public String getCno() {        return cno;    }    public void setCno(String cno) {        this.cno = cno;    }    public double getAchievement() {        return achievement;    }    public void setAchievement(double achievement) {        this.achievement = achievement;    }    @Override    public String toString() {        return "StudentVo{" +                "sno='" + sno + '\'' +                ", sname='" + sname + '\'' +                ", ssex='" + ssex + '\'' +                ", spassword='" + spassword + '\'' +                ", cno='" + cno + '\'' +                ", achievement=" + achievement +                '}';    }}

 

9.jsp页面

(1)courseAll.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
${name}         

 

(2)courseStudent.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
学号 姓名
${Student.sno} ${Student.sname}

 

(3)courseVo.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
课程编号 课程名称 课时 教师编号 教师姓名
${CourseVo.cno} ${CourseVo.cname} ${CourseVo.ctime} ${CourseVo.tno} ${CourseVo.tname} 选课

 

(4)grade.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title<%! int i=-1; %>
<% i=i+1;%>
课程编号 学号 姓名 成绩

 

(5)index.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>    Title学生老师
学号:
密码:

 

(6)list.jsp

<%--  Created by IntelliJ IDEA.  User: Administrator  Date: 2019/8/17 0017  Time: 上午 10:44  To change this template use File | Settings | File Templates.--%><%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title${list}
${CourseVo.cno} ${CourseVo.cname} ${CourseVo.ctime} ${CourseVo.tno} ${CourseVo.tname}

 

(7)lookCourse.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
课程编号 课程名称 课时 教师编号 教师姓名
${CourseVo.cno} ${CourseVo.cname} ${CourseVo.ctime} ${CourseVo.tno} ${CourseVo.tname}

 

(8)myDective.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
课程编号 课程名称 课时 教师编号 教师姓名
${CourseVo.cno} ${CourseVo.cname} ${CourseVo.ctime} ${CourseVo.tno} ${CourseVo.tname} 删除

 

(9)myGrade.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
课程名称 成绩
${DectiveVo.cname} ${DectiveVo.achievement}

 

(10)student.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title            
JSP Page 选课
查询已选课程
查询成绩
修改信息
学号 ${student.sno}
姓名 ${student.sname}
性别 ${student.ssex}
密码 ${student.spassword}

 

(11)studentUpdate.jsp

<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%>            
JSP Page
学号
姓名
登录密码

 

(12)teacher.jsp

<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>            
JSP Page 修改
查询课程信息
查询学生选课信息
录入成绩
教师编号: ${teacher.tno}
教师姓名: ${teacher.tname}
登录密码: ${teacher.tpassword}

 

(13)teacherCourse.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %><%@page isELIgnored="false" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>    Title
${name}         

 

(14)teacherlogin.jsp

<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%>            
JSP Page 学生老师
教师编号:
密码:

 

(15)teacherUpdate.jsp

<%@page contentType="text/html"%><%@page pageEncoding="UTF-8"%>            
JSP Page
教师编号
教师姓名
登录密码

 

 
=========================demo21==========================

转载于:https://www.cnblogs.com/dyddzhp/p/11390291.html

你可能感兴趣的文章
为什么wait()和notify()属于Object类
查看>>
PHP 在5.1.* 和5.2.*之间 PDO数据库操作中的不同!
查看>>
导入properties时的坑
查看>>
配置NRPE的通讯
查看>>
shp系列(一)——利用C++进行shp文件的读(打开)与写(创建)开言
查看>>
匹配两个空格之间的字符。。。
查看>>
CSS 文字溢出 变成省略号 ...
查看>>
Spring事务
查看>>
java编程基础(三)流程控制语句
查看>>
让数据库跑的更快的7个MySQL优化建议
查看>>
jquery 取id模糊查询
查看>>
解决在vue中,自用mask模态框出来后,下层的元素依旧可以滑动的问题
查看>>
修改node节点名称
查看>>
PAT(B) 1014 福尔摩斯的约会(Java)
查看>>
PAT甲级题解-1123. Is It a Complete AVL Tree (30)-AVL树+满二叉树
查看>>
项目开发总结报告(GB8567——88)
查看>>
SSH加固
查看>>
端口扫描base
查看>>
iOS IM开发的一些开源、框架和教程等资料
查看>>
FansUnion:共同写博客计划终究还是“流产”了
查看>>