Page 1 of 1

About Question enthuware.jwpv6.2.685 :

Posted: Tue May 08, 2012 3:25 am
by ETS User
Should the answer be it will not compile since were trying to use a bean having a public constructor as shown in the exhibit?

Re: About Question enthuware.jwpv6.2.685 :

Posted: Tue May 08, 2012 6:03 am
by admin
No, why do you think having a public constructor for a bean is a problem? A valid JavaBean bean should have a public constructor.

HTH,
Paul.

Re: About Question enthuware.jwpv6.2.685 :

Posted: Sat Feb 02, 2013 4:16 pm
by Siledh
It wouldn't compile or at least wouldn't work, because the <jsp:param> tag should be nested like that:

<jsp:useBean class="com.bookstore.Book" id="newbook" >
<jsp:setProperty name="newbook" property="isbn" value="1000"/>
</jsp:useBean>

And anyway, it would set the property only if the bean with "newbook" id hadn't been created earlier.

Re: About Question enthuware.jwpv6.2.685 :

Posted: Sat Feb 02, 2013 4:34 pm
by admin
The code in question uses setProperty and not setParam.

HTH,
Paul.

Re: About Question enthuware.jwpv6.2.685 :

Posted: Sun Feb 03, 2013 5:17 am
by Siledh
Right, silly me. Thanks for the answer!