Is there any additional code exhibit given for this example? The question has ambiguity on the location of the <jsp:setProperty>.
If <jsp:setProperty> is inside the <jsp:useBean> tag then it will never be invoked if the bean already exists. Hence answer 5 is correct on this assumption.
Thanks & Regards, Atul Samnerkar
posted 10 years ago
the question is complete. _________________________________________________________________________ Assume that hellobean exists in the page scope and has a method: public void setName(String name). __________________________________________________________________________
the answer is correct based upon the fact, that it has method setName, so the property name must be name.
But as the param is already given in the question, so the answer 1 should also be correct.