• 大小: 5.73MB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-02-12
  • 语言: Java
  • 标签: java  servlet  

资源简介

学生信息管理系统【JavaWeb】Servlet---Jsp

资源截图

代码片段和文件信息

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();
System.out.println(“addServlet1“+request.getParameter(“stSex“));
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(“���ʧ��!!“);
}

}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-01-19 17:12  StudentManagerWeb\
     文件           0  2020-01-19 17:12  StudentManagerWeb\jar鍖?
     文件     1536554  2014-07-21 16:12  StudentManagerWeb\jar鍖?ojdbc14.jar
     目录           0  2020-01-19 17:13  __MACOSX\
     目录           0  2020-01-19 17:13  __MACOSX\StudentManagerWeb\
     文件           0  2020-01-19 17:13  __MACOSX\StudentManagerWeb\jar鍖?
     文件         176  2014-07-21 16:12  __MACOSX\StudentManagerWeb\jar鍖?._ojdbc14.jar
     文件      393259  2014-07-21 16:12  StudentManagerWeb\jar鍖?standard.jar
     文件     1006956  2020-01-19 10:34  StudentManagerWeb\jar鍖?mysql-connector-java-5.1.48.jar
     文件       88209  2014-07-21 16:12  StudentManagerWeb\jar鍖?servlet-api.jar
     文件       20682  2014-07-21 16:12  StudentManagerWeb\jar鍖?jstl.jar
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\bootstrap\
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\bootstrap\css\
     文件      106006  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\css\bootstrap.min.css
     文件       22102  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\css\bootstrap-responsive.css
     文件      127343  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\css\bootstrap.css
     文件       16840  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\css\bootstrap-responsive.min.css
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\bootstrap\js\
     文件       61884  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\js\bootstrap.js
     文件       28631  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\js\bootstrap.min.js
     文件       92633  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\js\jQuery.js
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\bootstrap\img\
     文件       12799  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\img\glyphicons-halflings.png
     文件        8777  2014-07-21 16:12  StudentManagerWeb\WebRoot\bootstrap\img\glyphicons-halflings-white.png
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\images\
     文件         625  2014-07-21 16:12  StudentManagerWeb\WebRoot\images\error.png
     文件        9551  2014-07-21 16:12  StudentManagerWeb\WebRoot\images\logo.png
     文件         464  2014-07-21 16:12  StudentManagerWeb\WebRoot\updatepwdSuccess.jsp
     文件        2879  2020-01-19 14:14  StudentManagerWeb\WebRoot\displaystudent.jsp
     目录           0  2020-01-19 13:49  StudentManagerWeb\WebRoot\js\
............此处省略118个文件信息

评论

共有 条评论