Dynamic vars in c:set

2005-08-25 Thread Dylan MacDonald
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?

Thanks,

Dylan MacDonald



__ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250

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



Re: Dynamic vars in c:set

2005-08-25 Thread Rahul P Akolkar
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
>