• 大小: 12.82MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-10
  • 语言: 其他
  • 标签: ssh  简单例子  

资源简介

ssh框架的学生管理的简单例子,包括增删改查。

资源截图

代码片段和文件信息

package ssh.demo.action;

import ssh.demo.dao.IStudentDAO;
import ssh.demo.dao.model.Student;

import com.opensymphony.xwork2.ActionSupport;

public class AddStudentAction extends ActionSupport {

private String sname;
private String sex;
private String sno;
private int age;
private String pro;

private IStudentDAO studentDAO;


public IStudentDAO getStudentDAO() {
return studentDAO;
}



public void setStudentDAO(IStudentDAO studentDAO) {
this.studentDAO = studentDAO;
}



public String getSname() {
return sname;
}



public void setSname(String sname) {
this.sname = sname;
}



public String getSex() {
return sex;
}



public void setSex(String sex) {
this.sex = sex;
}



public String getSno() {
return sno;
}



public void setSno(String sno) {
this.sno = sno;
}



public int getAge() {
return age;
}



public void setAge(int age) {
this.age = age;
}



public String getPro() {
return pro;
}



public void setPro(String pro) {
this.pro = pro;
}



@Override
public String execute() throws Exception {
Student student = new Student();
student.setSname(sname);
student.setSex(sex);
student.setAge(age);
student.setSno(sno);
student.setPro(pro);

student = studentDAO.saveStudent(student);

//int sid = student.getSid();
//System.out.println(“sid=“ + sid);

return SUCCESS;
}

}

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

     文件        538  2011-02-20 18:11  sshdemo\.classpath

     文件       1040  2011-02-20 18:02  sshdemo\.project

     文件        360  2011-02-20 18:02  sshdemo\.settings\.jsdtscope

     文件        330  2011-02-20 18:02  sshdemo\.settings\org.eclipse.jdt.core.prefs

     文件        364  2011-02-20 18:02  sshdemo\.settings\org.eclipse.jst.common.project.facet.core.prefs

     文件        380  2011-02-20 18:02  sshdemo\.settings\org.eclipse.wst.common.component

     文件        320  2011-02-20 18:02  sshdemo\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2011-02-20 18:02  sshdemo\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2011-02-20 18:02  sshdemo\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       2170  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\action\AddStudentAction.class

     文件       2176  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\action\DeleteStudentAction.class

     文件       2350  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\action\EditStudentAction.class

     文件       2347  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\action\SearchStudentAction.class

     文件       1769  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\action\ShowStudentAction.class

     文件        975  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\action\UpdateStudentActioni.class

     文件       2121  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\dao\impl\StudentDAO.class

     文件        610  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\dao\IStudentDAO.class

     文件       1503  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\dao\model\Student.class

     文件        883  2011-02-20 18:02  sshdemo\build\classes\ssh\demo\dao\model\Student.hbm.xml

     文件       1489  2011-02-20 18:02  sshdemo\src\ssh\demo\action\AddStudentAction.java

     文件       1279  2011-02-20 18:02  sshdemo\src\ssh\demo\action\DeleteStudentAction.java

     文件       1556  2011-02-20 18:02  sshdemo\src\ssh\demo\action\EditStudentAction.java

     文件       1463  2011-02-20 18:02  sshdemo\src\ssh\demo\action\SearchStudentAction.java

     文件       1072  2011-02-20 18:02  sshdemo\src\ssh\demo\action\ShowStudentAction.java

     文件        610  2011-02-20 18:02  sshdemo\src\ssh\demo\action\UpdateStudentActioni.java

     文件       1362  2011-02-20 18:02  sshdemo\src\ssh\demo\dao\impl\StudentDAO.java

     文件        396  2011-02-20 18:02  sshdemo\src\ssh\demo\dao\IStudentDAO.java

     文件        883  2011-02-20 18:02  sshdemo\src\ssh\demo\dao\model\Student.hbm.xml

     文件        845  2011-02-20 18:02  sshdemo\src\ssh\demo\dao\model\Student.java

     文件       1218  2011-02-20 18:02  sshdemo\WebContent\addstudent.jsp

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

评论

共有 条评论