数组。
private String document[] = null ;
public void setDocument( String[] document ){
this.document = document ;
}
public String[] getDocument(){
return this.document ;
}
private String document[] = null ;
public void setDocument( String[] document ){
this.document = document ;
}
public String[] getDocument(){
return this.document ;
}
解决方案 »
- 两次查询报错
- PreparedStatement的addBatch()和addBatch(String sql)
- 走过路过帮我看看这个Unable to load configuration的问题吧~
- 严重: Servlet /MobileEmployee threw load() exception
- 一道面试题,spring和hibernate的事务管理方式有什么不同?
- 关于No ResultSet set was produced
- >>>>谁有Google Web APIs,给偶发一份,谢谢<<<<
- 请问大侠,这段struts代码如何使用<html:iterate>,
- 请问在jsp或者servlet中怎样动态生成gif图片?
- tomcat启动报错
- Struts easy 问题~
- 请教:如何更新数据库?
按照你的方法,所有的值是可以放入数组中,但是返回页面显示的时候有问题,input中显示的是数组的地址
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="document" type="java.lang.String[]" size="2"/>
</form-bean>我通常使用org.apache.struts.validator.DynaValidatorForm,这样连
formbean都不用写了
你这里指定了size为2,如果我是动态的怎么办呢???
id="foo" indexId="ctr">
<html:text name='<%= "document[" + ctr + "]" %>'/>
</logic:iterate>
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="document" type="java.lang.String[]"/>
</form-bean>