Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Required attribute for <jsp:setProperty>

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this one from j2eecertificate.com:

Which of the following attributes are mandatory within the <jsp:setProperty> tag? [Check all correct answers]



1. Name
2. property
3. value
4. type
5. id


Surprisingly, the answer is....


















2. property.

I understand that if the property is a req param, the container will automatically map the param name to the value attribute. What I don't get: How can you set a property without first naming a bean?
 
melan hen
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following is what I get from JSP v2.0 Spec pg. 1-106
<jsp:setProperty name="beanName" prop_expr/>
prop_expr ::=
property="*" |
property="propertyName"|
property="propertyName" param="parameterName"|
property="propertyName" value="propertyValue"

propertyValue :: =string

I think both name and property is required,please correct me if I misunderstood.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic