动态Form中定义ArrayList对象该如何访问,如何设值? 动态Form中定义ArrayList对象该如何访问,如何设值? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 访问?action中,通过数据库找出值来赋。页面中用struts标签可以显示 <logic:present name="allcountry"> <logic:iterate id="co" name="allcountry"> <option value="<bean:write name="co" property="cid"/>"><bean:write name="co" property="cname"/></option> </logic:iterate> </logic:present> 说错成list的了访问用<%%>的ArrayList l=(ArrayList)ses.getAttribute("selcdt"); //看你是怎么传的了l.get(0),(String)l.get(1),(String)l.get(2),(String)l.get(3).../具体取哪个 就看你了设值的一种: ArrayList l=new ArrayList(); l.add(0,country); l.add(1,province); l.add(2,mainindustry); l.add(3,subindustry); l.add(4,role);都是string的对应上面的传值 ses.setAttribute("selcdt",l); <%通过jsp标记可以达到这种效果%> 可以先放进Hashtable,然后再构造成Vector,这样也可以啊。。 我的意思是从JSP中提交的值怎么放到动态FORM的LIST里啊? l.add(0,country); l.add(1,province); l.add(2,mainindustry); l.add(3,subindustry); l.add(4,role);()里面右边的是传来jsp的值,从jsp接受值不用说了吧 用jquery实现图片连续滚动 struts1 多个文件下载问题 ssh2构架中对于登陆页面要不要做非法字符的过滤? 数据库查询问题 JavaBean配置的问题 DX急救 很多页面都链接到同一页面,在返回时如何判断返回到原先的页面?(不用histroy.back()) 本人刚开始学习java,请问大虾如何在jbuilder7.0下把已写好的.java文件,编译成.class文件? jsp中的表格问题,高分难题 望指点jsp解决中文的几种方法!! jsp中动态属性菜单的问题 救命 在线等 如何将TOMCATE的默认首页换成自定定义的首页
action中,通过数据库找出值来赋。页面中用struts标签可以显示 <logic:present name="allcountry">
<logic:iterate id="co" name="allcountry">
<option value="<bean:write name="co" property="cid"/>"><bean:write name="co" property="cname"/></option>
</logic:iterate>
</logic:present>
l.get(0),(String)l.get(1),(String)l.get(2),(String)l.get(3).../具体取哪个 就看你了设值的一种: ArrayList l=new ArrayList();
l.add(0,country);
l.add(1,province);
l.add(2,mainindustry);
l.add(3,subindustry);
l.add(4,role);都是string的对应上面的传值
ses.setAttribute("selcdt",l);
通过jsp标记可以达到这种效果
%>
l.add(1,province);
l.add(2,mainindustry);
l.add(3,subindustry);
l.add(4,role);
()里面右边的是传来jsp的值,从jsp接受值不用说了吧