The value of the name attribute in jsp:setProperty and jsp:getProperty will refer to an object that is obtained from the pageContext object through its findAttribute method.
findAttribute will try to locate the attribute in page, request, session and application objects. And that means as long as the value of the name attribute in jsp:setProperty and jsp:getProperty refers to an attribute in any of the four objects, jsp:setProperty and jsp:getProperty will succeed without using jsp:useBean (assume that there is only one attribute with that name). I tested it in Tomcat 5.5.12 and it worked.
Does tomcat violate the spec? Can someone explain this to me.
That is funny, I was just about to ask the exact question. I was confused by the final mock exam in the HFSJ #63, where it has a jsp:setproperty, without a usebean, and it said it was fine. I thought you MUST have a js;:usebean also??