• Post Reply Bookmark Topic Watch Topic
  • New Topic

c:set target="${...}" or target="..."  RSS feed

 
satya mahapatra
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. In HF page 446 its written that, "With target attribute you don't type in the String literal that represents the name under which the attribute was bound to the page,scope,etc. No,the target attribute needs a value that resolves to the real THING. That means EL expr on scripting expr or <jsp:attribute> ".

But in Hanumant & Malvia book I saw code like
<c:set target="customer1" property="zipcode">
55501
<c:set>

where target is used inside String literal. Which format is correct.
I am bit confused on this target. If anyone can help or send some
link that will be a great help.

Thanks,
Satya
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HF is correct. The target must be an expression that evaluates to the object that is to be operated upon.

You can easily write up a JSP to test this in a few minutes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!