资源简介
JavaWeb教务管理系统
代码片段和文件信息
package com.dw.controll;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.dw.dao.StudentDao;
import com.dw.dao.impl.StudentDaoImpl;
import com.dw.model.Student;
/**
* 控制层 -添加 逻辑处理
@author DY1101shaoyuxian
*
*/
public class AddServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
this.doPost(request response);
}
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
// Student(stIdstNamestSexstAgestTelstDeptstAddress)
String stName = request.getParameter(“stName“);
String stSex = request.getParameter(“stSex“);
String stAge = request.getParameter(“stAge“);
Long stTel = Long.parseLong(request.getParameter(“stTel“));
String stDept = request.getParameter(“stDept“);
String stAddress = request.getParameter(“stAddress“);
Student stu = new Student(stName stSex stAge stTel stDept
stAddress);
StudentDao studao = new StudentDaoImpl();
boolean flag = studao.addStudent(stu);
if (flag && !(stTel == null) && !““.equals(stTel)) {
request.setAttribute(“msg“ “添加成功!!“);
request.getRequestDispatcher(“main.jsp“).forward(request
response);
} else {
request.getRequestDispatcher(“main.jsp“).forward(request
response);
System.out.println(“添加失败!!“);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 998 2016-04-13 17:30 StudentManager\StudentManagerWeb\.classpath
....... 324 2016-04-03 19:52 StudentManager\StudentManagerWeb\.myme
....... 1760 2016-04-03 19:52 StudentManager\StudentManagerWeb\.project
....... 500 2014-07-21 16:12 StudentManager\StudentManagerWeb\.settings\.jsdtscope
....... 395 2016-04-03 19:52 StudentManager\StudentManagerWeb\.settings\org.eclipse.jdt.core.prefs
....... 489 2016-04-13 17:30 StudentManager\StudentManagerWeb\.settings\org.eclipse.wst.common.component
....... 252 2016-04-03 19:52 StudentManager\StudentManagerWeb\.settings\org.eclipse.wst.common.project.facet.core.xm
....... 49 2016-04-03 19:52 StudentManager\StudentManagerWeb\.settings\org.eclipse.wst.jsdt.ui.superType.container
....... 6 2016-04-03 19:52 StudentManager\StudentManagerWeb\.settings\org.eclipse.wst.jsdt.ui.superType.name
....... 1692 2016-04-03 22:34 StudentManager\StudentManagerWeb\src\com\dw\controll\AddServlet.java
....... 1299 2016-04-03 22:34 StudentManager\StudentManagerWeb\src\com\dw\controll\DeleteServlet.java
....... 4652 2016-04-16 19:08 StudentManager\StudentManagerWeb\src\com\dw\controll\LoginServlet.java
....... 3929 2016-04-03 22:37 StudentManager\StudentManagerWeb\src\com\dw\controll\PreServlet.java
....... 2036 2016-04-03 22:38 StudentManager\StudentManagerWeb\src\com\dw\controll\SearchByIdServlet.java
....... 1205 2016-04-16 16:10 StudentManager\StudentManagerWeb\src\com\dw\controll\SearchServlet.java
....... 1207 2016-04-03 22:38 StudentManager\StudentManagerWeb\src\com\dw\controll\ShowAllServlet.java
....... 1596 2016-04-03 22:38 StudentManager\StudentManagerWeb\src\com\dw\controll\UpdateServlet.java
....... 5302 2016-04-03 22:35 StudentManager\StudentManagerWeb\src\com\dw\dao\impl\StudentDaoImpl.java
....... 1573 2016-04-16 18:42 StudentManager\StudentManagerWeb\src\com\dw\dao\impl\StudentUserDaoImpl.java
....... 1524 2016-04-16 16:47 StudentManager\StudentManagerWeb\src\com\dw\dao\impl\UserDaoImpl.java
....... 957 2016-04-03 22:28 StudentManager\StudentManagerWeb\src\com\dw\dao\StudentDao.java
....... 456 2016-04-16 16:55 StudentManager\StudentManagerWeb\src\com\dw\dao\StudentUserDao.java
....... 429 2016-04-03 22:21 StudentManager\StudentManagerWeb\src\com\dw\dao\UserDao.java
....... 1197 2016-04-03 22:29 StudentManager\StudentManagerWeb\src\com\dw\filter\EncodingFilter.java
....... 1811 2016-04-11 21:25 StudentManager\StudentManagerWeb\src\com\dw\model\Student.java
....... 771 2016-04-16 18:42 StudentManager\StudentManagerWeb\src\com\dw\model\StudentUser.java
....... 726 2016-04-11 21:35 StudentManager\StudentManagerWeb\src\com\dw\model\User.java
....... 1678 2016-04-11 21:35 StudentManager\StudentManagerWeb\src\com\dw\util\DbConn.java
....... 388 2016-04-03 22:33 StudentManager\StudentManagerWeb\src\com\dw\util\StringUtil.java
....... 103 2016-04-03 19:57 StudentManager\StudentManagerWeb\src\db.properties
............此处省略103个文件信息
相关资源
- 基于Java Web(ssh+oracle)的教务管理系
- 教务管理系统毕业设计源码加所有文
- javaweb课程大作业——教务管理系统
- 用java写的 教务管理系统源代码 学生
- javaweb sh2 教务管理系统
- mysql + java swing开发的教务管理系统
- java课程设计--简单教务管理系统设计
- 基于java wed的教务管理系统毕业设计全
- ssm教务管理系统毕业设计程序
- 基于SSM学校教务管理系统javaweb毕业设
- javaweb教务管理系统源码
- Java 教务管理系统
- TM00584-java教务管理系统源码.7z
- Java+mysql 教务管理系统 带数据库
- JAVA教务管理系统毕业论文.docx
- 基于java教务管理系统的教师端
- 教务管理系统jsp/java全部源代码
- 数据库课程设计教务管理系统
- 教务管理系统课程设计
- javaweb教务管理系统项目设计.zip
- 教务管理系统javaweb项目
- JSP 学校教务管理系统(jsp+servlet+jav
- jsp项目简单的教务管理系统
- jsp+servlet+SqlServer教务管理系统
- JSP+SQL教务管理系统-毕业设计
- android教务管理系统教师版
评论
共有 条评论