06-11
18
关于<html:link 传多参数问题,解决办法嘿~!
作者:Java伴侣 日期:2006-11-18
<%request.setAttribute("ID","s1"); %><br />
<%String ID=request.getAttribute("ID").toString(); %><br />
<%request.setAttribute("ID2","s2"); %><br />
<%
String ID2=request.getAttribute("ID2").toString();
%><br />
<%
HashMap myMap=new HashMap();
myMap.put("ID",ID);
myMap.put("ID2",ID2);
request.setAttribute("map", myMap);
%>
<html:link page="/return/jsp2.jsp" name="map">
MAP
</html:link>
<br />
<html:link href="jsp2.jsp" name="map">
MAP
</html:link>
虽然存入的是哈希表,但注意url的传参部分,两个参数耶^_^
<%String ID=request.getAttribute("ID").toString(); %><br />
<%request.setAttribute("ID2","s2"); %><br />
<%
String ID2=request.getAttribute("ID2").toString();
%><br />
<%
HashMap myMap=new HashMap();
myMap.put("ID",ID);
myMap.put("ID2",ID2);
request.setAttribute("map", myMap);
%>
<html:link page="/return/jsp2.jsp" name="map">
MAP
</html:link>
<br />
<html:link href="jsp2.jsp" name="map">
MAP
</html:link>
虽然存入的是哈希表,但注意url的传参部分,两个参数耶^_^
评论: 0 | 引用: 0 | 查看次数: 757
发表评论