• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL inside scripting

 
Gunnar Maluf
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code:




Is it possible to make this work?

regards
Gunnar
 
Javier Snaider
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nop,
The i variable is not visible in EL. You only can use attributes in EL. To do that you can use JSTL (Standard Tag Library) ForEach tag.
 
Gunnar Maluf
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup...

But i remember seeing a question using something like <%= ${movieList[i]} %> in JWebPlus saying the i var was only visible inside the scripts.... I tried this approuch and couldnt make it work.

regards
Gunnar
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i remember seeing a question using something like <%= ${movieList[i]} %> in JWebPlus saying the i var was only visible inside the scripts....

Yes, and "i" is not inside a scriptlet here, it's in an EL expression, so it doesn't work.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!