SSH action 里面的list怎么在页面获得 20
1个回答
展开全部
public class ConsumeAction extends ActionSupport implements RequestAware,SessionAware{
private static final long serialVersionUID = 1L;
Map<String, Object> request;
Map<String, Object> session;
@Override
public void setSession(Map<String, Object> session) {
// TODO Auto-generated method stub
this.session = session;
}
@Override
public void setRequest(Map<String, Object> request) {
// TODO Auto-generated method stub
this.request = request;
}
public String execute()throws Exception{
List list = new List();
request.put("requestlist",list);//这个只能在一次跳转后使用
session.put("sessionlist",list)// 在一次对话中使用都能使用
return SUCCESS;
}
}
private static final long serialVersionUID = 1L;
Map<String, Object> request;
Map<String, Object> session;
@Override
public void setSession(Map<String, Object> session) {
// TODO Auto-generated method stub
this.session = session;
}
@Override
public void setRequest(Map<String, Object> request) {
// TODO Auto-generated method stub
this.request = request;
}
public String execute()throws Exception{
List list = new List();
request.put("requestlist",list);//这个只能在一次跳转后使用
session.put("sessionlist",list)// 在一次对话中使用都能使用
return SUCCESS;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询