This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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

Re: jsp:attribute usage within c:set

Rina Magro
Ranch Hand

Joined: May 25, 2006
Posts: 63
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
Dagbj�rn Nogva

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.

Rina Magro
Ranch Hand

Joined: May 25, 2006
Posts: 63
Thanks Dagbj�rn, that was what i call a spot on answer.
I agree. Here's the link:
subject: Re: jsp:attribute usage within c:set
It's not a secret anymore!