Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forEach tag

 
priya Agrawal
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we put Scripting code in the body of foeEach tag?
 
vandu matcha
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
no!.. scripting cant be done in tags..
beacause the basic reason for using tags is to eliminate scripting....inorder to develop scriptless jsps..we use tags...hence we cant use scriptlets or scripting code inside a tag..
try an example...with that...u can learn by the container given error more than anything else..
hope this helps
ranchers correct me if i am wrong

regards
vandu
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ranchers correct me if i am wrong

I take the opportunity to do so

forEach tag's body content is JSP, which means that you can put some JSP in it, which will be interpreted by the container.




The basic reason to use tags is not to eliminate scripting(of course it helps eliminate scripting), but to make programmer's life easier, especially for those who are responsible to make JSP but who have little knowledge on Java.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic