I'm trying to get an element with a programmatically constructed id using EL in JSP. These ids follow the pattern table_1, table_2, table_3
, etc. Earlier versions without the generated ids got them via ${table_a}, ${table_b}
, etc. Now I'm trying to use ${table_${num}}
, but that isn't working. Does anyone know how to do this?
Other things I've tried have been ${parent_element.children().get(0)}
to sidestep having to use the id, but that doesn't seem to work either.
Clarification: I have a series of elements with ids table_1, table_2, table_3
, etc. I need to get the elements themselves. You would normally do this with ${table_1}, ${table_2}, ${table_3}
, but I'm trying to find a programmatic way to do it.