tags:

views:

205

answers:

1

Is there any way to specify a variable as a parameter name in JSTL, i.e:

<c:set var='myVar' value='dynamicParameterName' />

<c:out value='${param.(dynamicParameterName)}' />
+4  A: 

${param.myVar} or ${param[myVar]} are equivalent.

erickson
Thanks for the quick reply!
MontyBongo
The first one doesn't work in this particular case as `myVar` is at its own a variable. The second one (the so called brace notation) is indeed the way to go.
BalusC