Tag: hashmap预览模式: 普通 | 列表
08-07
25

struts运用jstl标签传多个参数

用struts传多个参数的方法,大家的思路都是将变量存到HashMap中然后再传参,就像以下代码。

<%
java.util.HashMap newValues = new java.util.HashMap();
newValues.put("floatProperty", new Float(444.0));
newValues.put("intProperty", new Integer(555));
newValues.put("stringArray", new String[]
{ "Value1", "Value2", "Value3" });
pageContext.setAttribute("newValues", newValues);

查看更多...

Tags: map hashmap

分类:Struts | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 791