This content has been marked as final.
Show 1 reply
-
1. Re: Select with dynamic name
jasonbrome Jul 27, 2002 1:03 PM (in response to andrea74m)How about using the getParameterNames() method on the HttpServletRequest, and iterate through the Enumeration of parameter names, looking for ones that match your prefix,
e.g.
String myPrefix = "menu_formato1";
Enumeration paramNames = request.getParameterNames();
while(paramNames.hasMoreElements()) {
String paramName = (String)paramNames.nextElement();
if(paramName.startsWith(myPrefix)) {
// Ok, we found a match...
String paramValue = request.getParameter(paramName);
// Do something with it...
}
}