资源简介

使用SSH框架开发,实现AJAX技术 适用于刚接触SSH开发的同学 适用于学期末课程设计

资源截图

代码片段和文件信息

package com.kai.action;

import java.io.IOException;
import java.io.PrintWriter;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathxmlApplicationContext; 
import com.kai.domain.*;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.interceptor.ServletResponseAware;
import javax.servlet.http.HttpServletResponse;
public class AddStudentAction extends ActionSupport implements ServletResponseAware{
private javax.servlet.http.HttpServletResponse response;
private String student_id;
private String student_name;
private String student_class;
private String student_college;
private String student_birthday;
private String student_native_place;
private String student_entrance;
private String student_drop;
private String work;
public javax.servlet.http.HttpServletResponse getResponse() {
return response;
}
public void setResponse(javax.servlet.http.HttpServletResponse response) {
this.response = response;
}


public String getStudent_id() {
return student_id;
}
public void setStudent_id(String student_id) {
this.student_id = student_id;
}
public String getStudent_name() {
return student_name;
}
public void setStudent_name(String student_name) {
this.student_name = student_name;
}
public String getStudent_class() {
return student_class;
}
public void setStudent_class(String student_class) {
this.student_class = student_class;
}
public String getStudent_college() {
return student_college;
}
public void setStudent_college(String student_college) {
this.student_college = student_college;
}
public String getStudent_birthday() {
return student_birthday;
}
public void setStudent_birthday(String student_birthday) {
this.student_birthday = student_birthday;
}
public String getStudent_native_place() {
return student_native_place;
}
public void setStudent_native_place(String student_native_place) {
this.student_native_place = student_native_place;
}
public String getStudent_entrance() {
return student_entrance;
}
public void setStudent_entrance(String student_entrance) {
this.student_entrance = student_entrance;
}
public String getStudent_drop() {
return student_drop;
}
public void setStudent_drop(String student_drop) {
this.student_drop = student_drop;
}
public void setWork(String work) {
this.work = work;
}
public String getWork() {
return work;
}
  public String addstudent() throws IOException{
  response.setContentType(“text/html;charset=GBK“);
  response.setCharacterEncoding(“GBK“);
BeanFactory applicationContext= new ClassPathxmlApplicationContext(“applicationContext.xml“);
PersonDao dao = (PersonDao) applicationContext.getBean(“Dao“);
Student s=new Student();
s.setStudent_id(student_id);
s.setPassword(“123456“);
s.setName(student_name);
s.setStudent_class(student_class);
s.setCollege(

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-07-21 14:06  webapps\
     目录           0  2013-07-21 14:06  webapps\graduation\
     文件         529  2013-05-19 15:12  webapps\graduation\.classpath
     目录           0  2013-07-21 14:06  webapps\graduation\.myeclipse\
     文件         491  2013-06-24 13:31  webapps\graduation\.myhibernatedata
     文件         303  2013-05-19 14:59  webapps\graduation\.mymetadata
     文件        1753  2013-05-19 15:08  webapps\graduation\.project
     目录           0  2013-07-21 14:06  webapps\graduation\.settings\
     文件         493  2013-05-19 14:59  webapps\graduation\.settings\.jsdtscope
     文件         119  2013-07-09 22:43  webapps\graduation\.settings\org.eclipse.core.resources.prefs
     文件         395  2013-05-19 14:59  webapps\graduation\.settings\org.eclipse.jdt.core.prefs
     文件         468  2013-05-19 14:59  webapps\graduation\.settings\org.eclipse.wst.common.component
     文件         252  2013-05-19 14:59  webapps\graduation\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2013-05-19 14:59  webapps\graduation\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2013-05-19 14:59  webapps\graduation\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\meta-INF\
     文件          36  2013-05-19 14:59  webapps\graduation\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\Pictures\
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\Pictures\student\
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\WEB-INF\
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\WEB-INF\classes\
     文件        2994  2013-06-23 20:46  webapps\graduation\WebRoot\WEB-INF\classes\applicationContext.xml
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\WEB-INF\classes\com\
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\
     目录           0  2013-07-21 14:06  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\action\
     文件        4572  2013-07-12 14:26  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\action\AddStudentAction.class
     文件        1551  2013-07-12 14:26  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\action\ChangePassAction.class
     文件        2896  2013-07-12 14:26  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\action\CheckFormAction.class
     文件        2383  2013-07-12 14:26  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\action\DelStudentAction.class
     文件        8206  2013-07-12 14:26  webapps\graduation\WebRoot\WEB-INF\classes\com\kai\action\ExportAction.class
............此处省略127个文件信息

评论

共有 条评论