About Question enthuware.jwpv6.2.845 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ETS User

About Question enthuware.jwpv6.2.845 :

Post by ETS User »

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

admin
Site Admin
Posts: 10066
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.845 :

Post by admin »

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.
If you like our products and services, please help us by posting your review here.

Guest

Re: About Question enthuware.jwpv6.2.845 :

Post by Guest »

Thanks a lot for the great tips!

Post Reply

Who is online

Users browsing this forum: No registered users and 148 guests