This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Regarding <c:set> with target property

 
Jay Shukla
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am preparing for SCWCD and using HFSJ for this. In HFSJ (Pg. 457) it is mentioned that

"target s not for the attribute name of bean or Map - it's for the actual attribute object." (Statement 1)

"If the target expression is not a Map or a bean, the Container throws an exception." (Statement 2)


Could anyone please let me know what is the meaning Statement 1 and Statement 2.

What exactly it is conveying?

Thanks,

Jay.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to set some values of a bean, or put some values in a Map, you can use the "target" attribute of the c:set tag. For example, to set the name of a bean whose name is "rancher" :


If you use the "target" attribute to set a value, the target must resolve to either a bean, or a Map.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correction:

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic