资源简介
自己用简单的java语言写的一个完整的学生出勤管理系统,是自己的毕业设计,数据库文件和毕业论文,源码都在里面。
代码片段和文件信息
package com.kaoqin.action;
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.kaoqin.dto.Instructor;
import com.kaoqin.dto.Student;
import com.kaoqin.dto.Teacher;
import com.kaoqin.service.AdminService;
import com.kaoqin.service.InstructorService;
import com.kaoqin.service.StuService;
import com.kaoqin.service.TeaService;
/**
* Servlet implementation class FirstAction
*/
public class FirstAction extends HttpServlet {
private static final long serialVersionUID = 1L;
AdminService adminService = new AdminService();
StuService stuService = new StuService();
TeaService teaService=new TeaService();
InstructorService insService=new InstructorService();
/**
* @see HttpServlet#HttpServlet()
*/
public FirstAction() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request
HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
doPost(request response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request HttpServletResponse
* response)
*/
protected void doPost(HttpServletRequest request
HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
response.setContentType(“text/html;charset=utf-8“);
String method = “login“;
if (request.getParameter(“method“) != null) {
method = request.getParameter(“method“);
}
if (“login“.equals(method)) {
doLogin(request response);
}else if(“clear“.equals(method)) {
doClear(request response);
}
}
private void doClear(HttpServletRequest request
HttpServletResponse response)throws ServletException IOException {
response.setContentType(“text/html;charset=UTF-8“);
HttpSession session=request.getSession();
session.removeAttribute(“name“);
response.sendRedirect(“login.jsp“);
}
private void doLogin(HttpServletRequest request
HttpServletResponse response) {
boolean result = false;
Teacher teacher=null;
Student student=null;
Instructor instructor=null;
String adminName = ““;
String adminPsw = ““;
String stuId=““;
String stuPsw=““;
String teaId=““;
String teaPsw=““;
int instrId=0;
String instrPsw=““;
String quanxian = request.getParameter(“quanxian“);
if (quanxian.equals(“0“)) {
if (request.getParameter(“Name“) != null) {
stuId = request.getParameter(“Name“).toString();
}
if (request.getParameter(“Psw“) != null) {
stuPsw = request.getParameter(“Psw“).toString();
}
try {
student = stuService.login(stuId stuPsw);
if (student!=null) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-12-02 22:29 20131508129_王品品\
文件 1127936 2015-12-02 18:25 20131508129_王品品\20131508129_王品品_学生考勤管理系统毕业论文.doc
目录 0 2015-12-02 22:29 20131508129_王品品\图\
文件 49152 2015-10-12 18:19 20131508129_王品品\图\aaa.vsd
文件 53248 2015-10-12 18:24 20131508129_王品品\图\bbb.vsd
文件 84480 2015-10-03 19:14 20131508129_王品品\图\任课老师用例图.vsd
文件 61952 2015-10-03 19:15 20131508129_王品品\图\学生用例图.vsd
文件 125440 2015-10-02 15:12 20131508129_王品品\图\实体图.vsd
文件 164352 2015-10-10 17:30 20131508129_王品品\图\流程图.vsd
文件 92672 2015-10-02 15:17 20131508129_王品品\图\登录流程图.vsd
文件 89600 2015-10-03 19:15 20131508129_王品品\图\系统管理员用例图.vsd
文件 60928 2015-10-10 17:21 20131508129_王品品\图\绘图1.vsd
文件 54272 2015-10-01 14:33 20131508129_王品品\图\绘图2.vsd
文件 57344 2015-10-03 16:21 20131508129_王品品\图\院系领导用例图.vsd
目录 0 2015-12-02 22:29 20131508129_王品品\源码+数据库\
文件 2900 2015-12-02 22:28 20131508129_王品品\源码+数据库\151202222818.psc
目录 0 2015-12-02 22:29 20131508129_王品品\源码+数据库\kaoqin\
文件 841 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.classpath
文件 1039 2015-11-02 10:49 20131508129_王品品\源码+数据库\kaoqin\.project
目录 0 2015-12-02 22:29 20131508129_王品品\源码+数据库\kaoqin\.settings\
文件 503 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.settings\.jsdtscope
文件 102 2015-11-10 11:22 20131508129_王品品\源码+数据库\kaoqin\.settings\org.eclipse.core.resources.prefs
文件 364 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.settings\org.eclipse.jdt.core.prefs
文件 470 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.settings\org.eclipse.wst.common.component
文件 345 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2015-12-02 22:29 20131508129_王品品\源码+数据库\kaoqin\WebContent\
目录 0 2015-12-02 22:29 20131508129_王品品\源码+数据库\kaoqin\WebContent\me
文件 39 2015-11-01 13:26 20131508129_王品品\源码+数据库\kaoqin\WebContent\me
目录 0 2015-12-02 22:29 20131508129_王品品\源码+数据库\kaoqin\WebContent\WEB-INF\
............此处省略262个文件信息
- 上一篇:JSP美发店管理系统
- 下一篇:自动生成Java代码,采用SSM框架
评论
共有 条评论