66
Marks: 1 Given a
JSP page that contains the following code
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<jsp:useBean class="com.examulator.userBean" id="user" />And given that userBean has a correctly defined setFirstName
Which of the following will set the firstName property of the userBean instance?
a)
<c:set target="${user}" property="firstName" value="marcus"/>
b)
<c:set property="firstName" var="user" value="elephant"/>
c)
<c:set target="user" property="firstName" value="marcus"/>
d)
<c:set id="user" property="firstName" value="marcus"/>
e)
<c:set id="user" target="firstName" value="marcus"/>
I thinks thre is no answer is for this question. but the mock exam shows answer is A.
can any one expalin how A is the answer for this question.
according to c:set rules "The target value of c:set must be eveluate to the actual bean object "