i.e.:
and
A) Your first example is okay, because the forms time of submission will be different:
B) Your second example is also okay, but not standard coding practice:
Java code two extract both values:
Map parmMap = requestObj.getParameterMap();
String input1 = parmMap.get("url")[0];
String input2 = parmMap.get("url")[1];