• 大小: 9.26MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-14
  • 语言: Java
  • 标签: javaEE  

资源简介

学生学籍管理系统,是javaEE的课程设计,包含所有源代码和sql文件,下载就能立刻运行,界面非常优美.

资源截图

代码片段和文件信息

package com.dgut.sc.controler;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.dgut.sc.domain.Admin;
import com.dgut.sc.domain.Course;
import com.dgut.sc.domain.Teacher;
import com.dgut.sc.service.BusinessService;
import com.dgut.sc.service.impl.BusinessServiceImpl;
import com.sc.util.Page;

public class AddCourseServlet extends HttpServlet {
private BusinessService service = new BusinessServiceImpl();
private static final long serialVersionUID = 1L;

public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
request.setCharacterEncoding(“utf-8“);
response.setContentType(“text/jsp;charset=utf-8“);
response.setCharacterEncoding(“utf-8“);
Admin admin = (Admin) request.getSession().getAttribute(“admin“);
if (admin == null) {
request.setAttribute(“message“
ript type=‘text/javascript‘>alert(‘请先登录才可操作‘)ript>“);
request.getRequestDispatcher(“/index.jsp“).forward(request
response);
return;
} else {
// 时间戳
String timeStamp = String.valueOf(new java.util.Date().getTime());
HttpSession session = request.getSession();
// 创建新令牌值
String tokenStr = session.getId() + timeStamp;
// 识别令牌不合法将中止页面运行
// 更新令牌
session.setAttribute(“CONTROL_REFRESH“ tokenStr);

String tno = request.getParameter(“tno“);
String tname = request.getParameter(“tname“);
String cno = request.getParameter(“cno“);
String cname = request.getParameter(“cname“);
String credit = request.getParameter(“credit“);
boolean flag = false;
if (tname != null && tno != null && cno != null && cname != null
&& credit != null) {
Course course = new Course(cno cname tno tname credit);
flag = service.addCourse(course);
if (flag) {
request.setAttribute(“message“
ript type=‘text/javascript‘>alert(‘增加成功‘)ript>“);
} else {
request.setAttribute(“message“
ript type=‘text/javascript‘>alert(‘增加失败‘)ript>“);
}
String pageNum = request.getParameter(“pageNum“);
Page page = service.findCoursesRecords(pageNum);
page.setUrl(“/AdminToCourseServlet“);
request.setAttribute(“page“ page);
request.getRequestDispatcher(“/WEB-INF/admin_course.jsp“)
.forward(request response);
}
}
}

public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doGet(request response);
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1133  2016-06-07 21:53  StudentScore\.classpath

     文件       1337  2016-06-07 21:05  StudentScore\.project

     文件        522  2016-06-07 20:27  StudentScore\.settings\.jsdtscope

     文件        236  2016-06-11 22:44  StudentScore\.settings\com.genuitec.eclipse.core.prefs

     文件         66  2016-06-11 17:06  StudentScore\.settings\org.eclipse.core.resources.prefs

     文件        598  2016-06-11 14:54  StudentScore\.settings\org.eclipse.jdt.core.prefs

     文件        106  2016-06-11 16:19  StudentScore\.settings\org.eclipse.ltk.core.refactoring.prefs

     文件        487  2016-06-07 20:27  StudentScore\.settings\org.eclipse.wst.common.component

     文件        401  2016-06-07 20:27  StudentScore\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2016-06-07 20:27  StudentScore\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2016-06-07 20:27  StudentScore\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       3765  2016-06-13 15:06  StudentScore\build\classes\com\dgut\sc\controler\AddCourseServlet.class

     文件       4379  2016-06-13 16:54  StudentScore\build\classes\com\dgut\sc\controler\AddScoreServlet.class

     文件       3894  2016-06-13 13:48  StudentScore\build\classes\com\dgut\sc\controler\AddStuServlet.class

     文件       3894  2016-06-13 13:49  StudentScore\build\classes\com\dgut\sc\controler\AddTeaServlet.class

     文件       3014  2016-06-13 14:45  StudentScore\build\classes\com\dgut\sc\controler\AdminToCourseServlet.class

     文件       3004  2016-06-13 13:51  StudentScore\build\classes\com\dgut\sc\controler\AdminToTeaServlet.class

     文件       3717  2016-06-13 15:34  StudentScore\build\classes\com\dgut\sc\controler\DeleteCourseServlet.class

     文件       3824  2016-06-13 17:12  StudentScore\build\classes\com\dgut\sc\controler\DeleteScoreServlet.class

     文件       3700  2016-06-12 17:41  StudentScore\build\classes\com\dgut\sc\controler\DeleteStuServlet.class

     文件       3708  2016-06-13 13:51  StudentScore\build\classes\com\dgut\sc\controler\DeleteTeaServlet.class

     文件       3018  2016-06-13 15:39  StudentScore\build\classes\com\dgut\sc\controler\GetCourseToUpdateServlet.class

     文件       3200  2016-06-13 17:31  StudentScore\build\classes\com\dgut\sc\controler\GetScoreToUpdateServlet.class

     文件       3011  2016-06-12 23:08  StudentScore\build\classes\com\dgut\sc\controler\GetStuToUpdateServlet.class

     文件       3010  2016-06-13 13:57  StudentScore\build\classes\com\dgut\sc\controler\GetTeaToUpdateServlet.class

     文件       5903  2016-06-13 19:45  StudentScore\build\classes\com\dgut\sc\controler\LoginServlet.class

     文件       1282  2016-06-12 13:51  StudentScore\build\classes\com\dgut\sc\controler\LogoutServlet.class

     文件       2231  2016-06-13 16:31  StudentScore\build\classes\com\dgut\sc\controler\StudentInfoServlet.class

     文件       1947  2016-06-13 16:31  StudentScore\build\classes\com\dgut\sc\controler\TeacherInfoServlet.class

     文件       3748  2016-06-13 13:51  StudentScore\build\classes\com\dgut\sc\controler\UpdateAdminPwdServlet.class

............此处省略1787个文件信息

评论

共有 条评论