<input name="name" type="text" id="name" />
java.util.Map map=ActionContext.getContext().getParameters();
String[] s=(String[])map.get("name");
System.out.println(s[0]);
String xx=ServletActionContext.getRequest().getParameter("xx");
本文介绍了一种使用Struts框架获取表单输入的方法,通过ActionContext和ServletActionContext来读取表单中名为'name'和'xx'的字段值。
<input name="name" type="text" id="name" />
java.util.Map map=ActionContext.getContext().getParameters();
String[] s=(String[])map.get("name");
System.out.println(s[0]);
String xx=ServletActionContext.getRequest().getParameter("xx");

被折叠的 条评论
为什么被折叠?