Hi,
I was wondering about question 39:
"Consider the following line of code appearing in a JSP page:
<jsp:setProperty name="hellobean" property="username" param="name" />
Which of the following statements regarding the above line of code is correct?
Assume that hellobean exists in the page scope and has a method: public void setName(String name)."
The first option is considered wrong:
"If the request contains a name parameter, its value will be set into the bean."....
But it is a bit ambiguous because it is not mentioned in the description that the setName(String name) is the one and only method of that bean..so this creates false impression that other suitable setters (setUserName(String name)) might exist...
Maybe in order to be more clear it would be nice to add in the last sentence something like "..exists in the page scope and has one only method: public void setName(String name)"
Thanks
About Question enthuware.jwpv6.2.845 :
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.845 :
Sure, we will make it more clear. Thank you for your feedback!
Although as a general guideline for the exam, you should only assume what is explicitly stated in the question. Here, it mentions that the bean contains setName method and doesn't mention anything else, so you should not assume the presence of any other method.
HTH,
Paul.
Although as a general guideline for the exam, you should only assume what is explicitly stated in the question. Here, it mentions that the bean contains setName method and doesn't mention anything else, so you should not assume the presence of any other method.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 97 guests