On Thu, 30 Jan 2003, Chris Yocum wrote:

> Hi all,
>      I have searched the mail archive and I have not found an answer to my 
> questions.  My question is:  I have a <c:forEach> loop that dynamically 
> generates HTML parameters.  Once the user clicks on the submit button,  I 
> programmatically know how many there are since I save the number in a 
> variable.  However, I have no way of combining that number with the param 
> object.  For example, I cannot do <c:out value="${param.thing_}${count}" /> 
> or <c:out value="${param.thing_${count}}" />.
>      I will mock up some code if there is confusion about my question.  
> Thanks for all the help!

You'll want to build up the string first and then use it as a dynamic
property of 'param':

 <c:set var="x" value="thing_${count}" />
 <c:out value="${param[x]}" />

-- 
Shawn Bayern
"JSTL in Action"   http://www.manning.com/bayern


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to