资源简介
压缩包内包括sql文件、jsp代码和一份报告。
类似于我校教务管理系统,有四类用户:
教务员可以输入学生、教师、班级、课程信息,一个班级只属于一个专业,一个学生只属于一个班级。教务员负责输入每个专业、每个班级需要学习哪些课程,指定课程的任课教师。
教师可以查看学习该课程的学生名单。课程结束后,教师可以录入课程成绩。一个教师可以教授多个班的多门课程,每门课由多位老师讲授。
课程分两类,必修课和选修课。系统要记录每个学生学习各门必修课的成绩,还要记录学生选修了哪些选修课以及课程成绩。学生可以查看自己各门课程的成绩。学生还可以进行评教,给老师打分。
系统管理员可以输入教室信息,并结合班级、课程、教室信息实现自动排课。

代码片段和文件信息
package manager;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Addclass
*/
@WebServlet(“/Addclass“)
public class Addclass extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Addclass() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
PrintWriter out=response.getWriter();
request.setCharacterEncoding(“utf-8“);
// response.setContentType(“text/javascript“);
String classid = request.getParameter(“classid“);
String mid = request.getParameter(“mid“);
Connection con;
CallableStatement cs;
ResultSet rs;
//String bname=request.getParameter(“bname“);
try {
Class.forName(“com.mysql.jdbc.Driver“);
/* 下载JDBC数据库驱动程序, 把驱动包放到项目的 WEB-INF/lib 下面 */
} catch (Exception e) {
out.println(“缺少数据库驱动程序 “);
}
try {
String uri=“jdbc:mysql://localhost/edu?“+
“user=root&password=123456&characterEncoding=gbk“;
con = DriverManager.getConnection(uri);
cs = con.prepareCall(“{call addclass(??)}“);//调用存储过程searchbook进行模糊查询
cs.setString(1classid);//向存储过程中的参数进行传值
cs.setString(2mid);
cs.executeUpdate();
//rs=cs.executeQuery();
response.sendRedirect(“addclass.jsp“);
//boolean m=rs.next();
/*if(m)
{
response.sendRedirect(“addclass.jsp“);
}
//response.sendRedirect(“addclass.jsp“);
else {
out.print(“ript>alert(‘输入错误,请重新输入‘) ript>“);
}
*/
}catch (SQLException e) {
out.print(e);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-09 20:57 教务管理系统\
目录 0 2019-01-01 20:09 教务管理系统\Education\
文件 815 2018-12-29 11:25 教务管理系统\Education\.classpath
文件 909 2018-12-25 14:23 教务管理系统\Education\.project
目录 0 2019-01-01 20:09 教务管理系统\Education\.settings\
文件 567 2018-12-25 14:23 教务管理系统\Education\.settings\.jsdtscope
文件 298 2018-12-27 10:49 教务管理系统\Education\.settings\org.eclipse.core.resources.prefs
文件 52 2018-12-26 10:21 教务管理系统\Education\.settings\org.eclipse.core.runtime.prefs
文件 358 2018-12-25 14:23 教务管理系统\Education\.settings\org.eclipse.jdt.core.prefs
文件 479 2018-12-25 14:23 教务管理系统\Education\.settings\org.eclipse.wst.common.component
文件 343 2018-12-25 14:23 教务管理系统\Education\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2018-12-25 14:23 教务管理系统\Education\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2018-12-25 14:23 教务管理系统\Education\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2019-01-01 20:09 教务管理系统\Education\WebContent\
目录 0 2019-01-01 20:09 教务管理系统\Education\WebContent\me
文件 39 2018-12-25 14:23 教务管理系统\Education\WebContent\me
目录 0 2019-01-01 20:09 教务管理系统\Education\WebContent\WEB-INF\
目录 0 2019-01-01 20:09 教务管理系统\Education\WebContent\WEB-INF\lib\
文件 846263 2018-11-28 15:38 教务管理系统\Education\WebContent\WEB-INF\lib\mysql-connector-java-5.1.24-bin.jar
文件 1983 2018-12-27 18:06 教务管理系统\Education\WebContent\addclass.jsp
文件 2232 2018-12-27 18:06 教务管理系统\Education\WebContent\addcou.jsp
文件 1926 2018-12-27 18:06 教务管理系统\Education\WebContent\addmajor.jsp
文件 2757 2018-12-27 18:06 教务管理系统\Education\WebContent\addstu.jsp
文件 2103 2018-12-27 18:06 教务管理系统\Education\WebContent\addtea.jsp
文件 1990 2018-12-27 23:08 教务管理系统\Education\WebContent\assign.jsp
文件 2303 2018-12-27 23:32 教务管理系统\Education\WebContent\choice.jsp
文件 2714 2018-12-27 10:40 教务管理系统\Education\WebContent\evaluate.jsp
文件 872 2018-12-28 18:44 教务管理系统\Education\WebContent\index.jsp
文件 688 2018-12-27 10:51 教务管理系统\Education\WebContent\index2.jsp
文件 717 2018-12-26 15:26 教务管理系统\Education\WebContent\index3.jsp
文件 2624 2018-12-27 12:58 教务管理系统\Education\WebContent\inputgra.jsp
............此处省略31个文件信息
- 上一篇:JSP 校园二手市场
- 下一篇:bouncycastle jar包
相关资源
- 美食天下项目Android版源码和Web版源码
- jsonarray所必需的6个jar包.rar
- JSP企业人事管理系统设计(源代码+论
- 当当网完整项目、包括js、css、html
- java代码编写将excel数据导入到mysql数据
- 实现一个图书管理系统
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- JAVA828436
- java 企业销售管理系统
- JSP,SQL,MVC的选课系统
- 基于JSP的学生宿舍管理系统(源码 数
- JSP选课管理系统
- mysql jsp网站源码下载
- JSP做的化妆品商城
- Jsp购物车实例
- 基于JSP的校友信息管理系统(添加数
- 基于jsp的bbs论坛 非常详细
- jsp oracle通讯录
- JSP学生信息管理系统 Mysql数据库
- 使用jsp servlet做的投票系统
- android通过JDBC连接Mysql数据库
- JSP登陆验证 实现JSP用户名 密码 验
- jsp基于servlet 图书馆管理系统
- jsp学生成绩管理系统.rar
- 在线考试系统源代码(jsp)
- 超级好的纯jsp写的聊天室
- java数据库连接(所有的数据库都支持
- JSP 网上购物网页项目
- JSP+mysql新闻发布系统.rar
评论
共有 条评论