• 大小: 18.4MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-04
  • 语言: 其他
  • 标签: ssh  web  struts  hibernate  

资源简介

专门为在校不好好学习计算机专业的同学 弄得一个基于ssh的学生信息管理系统 把数据库脚本文件导入本地后即可正常使用

资源截图

代码片段和文件信息

/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.yourcompany.struts.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import sodi.dao.IStudentDao;
import sodi.pojo.Student;

import com.yourcompany.struts.form.StudentAddForm;

/** 
 * MyEclipse Struts
 * Creation date: 09-04-2008
 * 
 * XDoclet definition:
 * @struts.action path=“/addStudent“ name=“addStudentForm“ input=“/form/addStudent.jsp“ scope=“request“ validate=“true“
 * @struts.action-forward name=“ok“ path=“/studentMainPage.jsp“
 */
public class StudentAddAction extends Action {

private IStudentDao studentDao;
/*
 * Generated Methods
 */

public IStudentDao getStudentDao() {
return studentDao;
}

public void setStudentDao(IStudentDao studentDao) {
this.studentDao = studentDao;
}

/** 
 * Method execute
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */
public ActionForward execute(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
//获取addStudentForm对象
StudentAddForm addStudentForm = (StudentAddForm) form;

//封装成student对象
Student student=new Student();
student.setStuName(addStudentForm.getStuName());
student.setStuAge(Integer.parseInt(addStudentForm.getStuAge()));
student.setStuSex(addStudentForm.getStuSex());
student.setStuEdu(addStudentForm.getStuEdu());
student.setStuInfo(addStudentForm.getStuInfo());

//进行数据库添加操作
studentDao.save(student);

return mapping.findForward(“ok“);
}
}

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

     文件       5227  2008-09-04 15:20  StudentManageSystem\.classpath

     文件        527  2008-09-04 15:26  StudentManageSystem\.myhibernatedata

     文件        284  2012-03-31 16:35  StudentManageSystem\.mymetadata

     文件        262  2008-09-04 15:19  StudentManageSystem\.mystrutsdata

     文件       1902  2012-03-31 15:39  StudentManageSystem\.project

     文件        479  2008-09-04 15:18  StudentManageSystem\.springBeans

     文件       2434  2008-09-05 01:38  StudentManageSystem\exam3.sql

     文件        500  2012-03-31 15:39  StudentManageSystem\.settings\.jsdtscope

     文件        214  2012-03-31 17:17  StudentManageSystem\.settings\org.eclipse.core.resources.prefs

     文件        330  2008-09-04 15:16  StudentManageSystem\.settings\org.eclipse.jdt.core.prefs

     文件         49  2012-03-31 15:39  StudentManageSystem\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2012-03-31 15:39  StudentManageSystem\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        177  2008-09-04 16:34  StudentManageSystem\src\com\yourcompany\struts\ApplicationResources.properties

     文件       1876  2008-09-05 02:44  StudentManageSystem\src\com\yourcompany\struts\action\StudentAddAction.java

     文件       1867  2008-09-05 02:44  StudentManageSystem\src\com\yourcompany\struts\action\StudentChooseToDeleteAction.java

     文件       1987  2008-09-05 02:43  StudentManageSystem\src\com\yourcompany\struts\action\StudentUpdateAction.java

     文件       2699  2012-03-31 16:57  StudentManageSystem\src\com\yourcompany\struts\action\UserLoginAction.java

     文件       1776  2008-09-04 23:38  StudentManageSystem\src\com\yourcompany\struts\form\StudentAddForm.java

     文件       1376  2008-09-04 22:29  StudentManageSystem\src\com\yourcompany\struts\form\StudentChooseToDeleteForm.java

     文件       2041  2008-09-05 00:47  StudentManageSystem\src\com\yourcompany\struts\form\StudentUpdateForm.java

     文件       1654  2008-09-04 16:14  StudentManageSystem\src\com\yourcompany\struts\form\UserLoginForm.java

     文件        373  2008-09-05 00:48  StudentManageSystem\src\sodi\dao\IStudentDao.java

     文件        166  2008-09-04 15:32  StudentManageSystem\src\sodi\dao\IUserDao.java

     文件       4830  2008-09-04 16:43  StudentManageSystem\src\sodi\dao\StudentDAO.java

     文件       4407  2008-09-04 16:31  StudentManageSystem\src\sodi\dao\UsertblDAO.java

     文件       1119  2012-03-31 20:25  StudentManageSystem\src\sodi\pojo\Student.hbm.xml

     文件       1487  2008-09-04 15:26  StudentManageSystem\src\sodi\pojo\Student.java

     文件        784  2012-03-31 20:25  StudentManageSystem\src\sodi\pojo\Usertbl.hbm.xml

     文件        908  2008-09-04 15:24  StudentManageSystem\src\sodi\pojo\Usertbl.java

     文件       6886  2012-03-31 16:58  StudentManageSystem\src\tools\Pagination.java

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

评论

共有 条评论