aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Re: jsp:attribute usage within c:set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Re: jsp:attribute usage within c:set" Watch "Re: jsp:attribute usage within c:set" New topic
Author

Re: jsp:attribute usage within c:set

Rina Magro
Ranch Hand

Joined: May 25, 2006
Posts: 63
Hi
im testing usage of jsp:attribute within c:set.
Can somebody please tell me why the first code snippet works fine while the second code snipped gives me error:




Please help
thanks lots
Rina
Dagbj�rn Nogva
Greenhorn

Joined: May 20, 2007
Posts: 10
Hi Rina,

According to the JSTL 1.2 spec, the valid formats of <c:set> are the following when used to set bean properties/map values:



As you can see, both target and property are required tag attributes. It is only the value attribute that alternatively can be specified by the tag body. Hence, your second code snippet is a violation of the spec.

Cheers,
Dagbj�rn
Rina Magro
Ranch Hand

Joined: May 25, 2006
Posts: 63
Thanks Dagbj�rn, that was what i call a spot on answer.
regards
Rina
 
Don't get me started about those stupid light bulbs.
 
subject: Re: jsp:attribute usage within c:set