I come from the world of PHP, where any form data that has a name ending with square brackets is automatically interpreted as an array. For example:
<input type="text" name="car[0]" /> <input type="text" name="car[1]" /> <input type="text" name="car[3]" />
will be caught on the PHP side as an array of the name "car" with 3 lines inside.
Now, is there a way to duplicate this behavior when sending to the JSP / Servlet server at all? Any libraries that can do this for you?
EDIT:
To expand this problem a little further:
In PHP,
<input type="text" name="car[0][name]" /> <input type="text" name="car[0][make]" /> <input type="text" name="car[1][name]" />
will give me a nested array. How can I reproduce this in JSP?
arrays html jsp forms servlets
Steve
source share