About Question enthuware.jwpv6.2.685 :
Moderator: admin
About Question enthuware.jwpv6.2.685 :
Should the answer be it will not compile since were trying to use a bean having a public constructor as shown in the exhibit?
Online
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.685 :
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.
HTH,
Paul.
Re: About Question enthuware.jwpv6.2.685 :
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.
<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.
Online
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.685 :
The code in question uses setProperty and not setParam.
HTH,
Paul.
HTH,
Paul.
Who is online
Users browsing this forum: No registered users and 9 guests