Dylan MacDonald <[EMAIL PROTECTED]> wrote on 08/25/2005 06:42:03 PM:
> Hi -
>
> I was wondering whether it was possible to set the var in the c:set tag
> dynamically? For example, within my forEach tags I want to build a
> list of page variables dynamically based on the index (or the varStatus
> count) of the loop:
>
>
>
>
>
> which I can then access in the page as variable1, variable2, etc. I
> assumed this was alright since I am using EL within the var attribute,
> but alas it doesn't seem to work. Any ideas or workarounds?
You can't gensym name-from-attribute's in JSP. The more important question
is why you think it is necessary. In other words, even if you created
variable1, ... ,variableN in pageContext, you'd still want to "run a loop"
through them to do something else. You should be able to do without
gensym, whatever it is you are doing.
-Rahul
>
> Thanks,
>
> Dylan MacDonald
>