Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL forEach

 
Alex Florentino
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Have index.jsp, the code:

don't show AFS... but if I put:


now it works!... it is correct ? the foreach only work for "attributes".

thanks a lot.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is correct. The EL has no access to scriplet variables, which makes sense since JSTL and EL are designed to remove the need for scriplets!

The proper term for the "attributes" are scoped variables.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic