Himanshu Kansal wrote:Hello,
According to what you are trying to do, things are happening correctly. You asked it to output the array object and that is what it gave u.
Concept of arrays for forms is that when you have a control like a series of checkboxes, you can use an array in your form to hold multiple selected values. The values in case of textboxes would normally be overwritten, instead of being mapped to arrays. I am not very sure but I think this is what happens to textboxes.
Still, if I assume that in case you have multiple textboxes, all with the same name attribute, and they do get mapped to the array in your form, then when you have a single textbox, you still would require to refer to its value through the array index, stockID[0] that is.
Ankit Garg wrote:There is only one stockId text field in your JSP page. Then why are you using an array in the Action Form?? If you really want an array, then you should probably iterate over that array in your JSP and display multiple stockId text fields...
Bear Bibeault wrote:Please do not show server-side markup in an HTML forum. Expand the markup to its generated HTML.