wood burning stoves 2.0*
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
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: http://aspose.com/file-tools
subject: Re: jsp:attribute usage within c:set
Similar Threads
How to Set HashMap in request attribute using JSTL Tag
Error in c:set tag
"c:set target" but no scope?
problem on c:set
c:set tag not clear