• Post Reply Bookmark Topic Watch Topic
  • New Topic

[HFS&J]Does jsp:setProperty have "id" attribute?  RSS feed

 
liny
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the "BANG" of HFS&J page 446, it says '...the "target" attribute is the tag seems like it should work like "id" in the <jsp:setProperty>...'.
But there is no "id" in the <jsp:setProperty>, the JSP spec also say no "id" for <jsp:setProperty>.
So I think it's wrong in the book.
Does anyone agree with me???
[ December 29, 2004: Message edited by: liny ]
 
Indrajit Donahar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look in the specs for
"<jsp:useBean id=�connection� class=�com.myco.myapp.Connection�>
<jsp:setProperty name=�connection� property=�timeout� value=�33�>
</jsp:useBean>"
Here the 'name' attribute of <jsp:setProperty> is referring to the 'id' attribute of the <jsp:useBean>
Also the spec describes the 'name' attribute as
"The name of a bean instance defined by a <jsp:useBean>
action or some other action. The bean instance must contain
the property to be set. The defining action must appear
before the <jsp:setProperty> action in the same file."

Also on the same page there is a comment which says "Don't put the 'id' name of the attribute here!".
Hope this clears your doubt or someone else may explain it more elegantly.
Thanks
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!