File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Re: jsp:attribute usage within c:set
 
Similar Threads
problem on c:set
"c:set target" but no scope?
c:set tag not clear
Error in c:set tag
How to Set HashMap in request attribute using JSTL Tag