首页>代码>SSH+JSP+MYSQL(spring4.2.4+struts2.3.24+hibernate4.1.7)用户登录以及简单增删查改的网站实例>/ssh_demo/src/com/action/QueryAction.java
package com.action;
import java.util.List;
import org.apache.struts2.ServletActionContext;
import com.entity.Custom;
import com.opensymphony.xwork2.ActionSupport;
import com.service.CustomService;
public class QueryAction extends ActionSupport{
private CustomService customService;
public CustomService getCustomService() {
return customService;
}
public void setCustomService(CustomService customService) {
this.customService = customService;
}
@Override
public String execute() throws Exception {
List<Custom> list = customService.findAll();
ServletActionContext.getRequest().setAttribute("customlist", list); //把所有客户存放在request范围内
return "success";
}
}
最近下载更多
星辰xc LV2
2023年5月7日
彩色天空 LV5
2023年4月8日
fengshengtian LV8
2022年2月19日
839749683 LV9
2021年12月21日
erqian LV1
2021年6月21日
1973356987 LV13
2021年6月16日
zdm_3366 LV3
2021年1月18日
lovemyhome LV5
2021年1月2日
wob_ku LV6
2020年7月4日
昵称zzz LV13
2020年7月3日

最近浏览