1、一个界面多action提交
2、取值方法:
①定义成map:(Map)ActionContext.getContext().get("request"); ActionContext.getContext().getSession(); (Map)ActionContext.getContext().getApplication();
调试出debug标签,在stack context(也叫Action context)里面,request下的值。
action的context同servlet的context,都是获取属性值。
后台定义private Map request; 封装request.put("r1", "r1");前台<%= request.getAttribute("r1")%>能获取到,后台map前台用对象能获取到,说明struts在map和http request之间建立了某些关联
②用struts标签获取值:<s: property value="#request.r1">在stack context下,可以用#key获取值
<s: property value="#attr.r1">也能获取到,是因为#attr是帮我们获取属性值,哪里有r1哪里有a1,再拿出来