jsp <s:iterator value="values" id="id"> <s:textfield name="values" value="%{id}"> </s:textfield> action.java private String values[]={"","",""}; public String[] getValues() { return values; } public void setValues(String s[]){ this.values=s; } 說明:在java要先宣告出 String[]的大小,然後才能在jsp中順利產生多個textfield input. 不過這樣做法沒辦法動態不同數量的textfield. reference: [Struts2] 內建的 OGNL Type Converter