giuseppe russo

Greenhorn
+ Follow
since Aug 16, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by giuseppe russo

Hi!
I've a problem with a question about jsp:getproperty:


Given the JavaBean class:
public class MyBean {
private Boolean roasted = false;
public MyBean () {}
public Boolean isRoasted () { returned roasted }
public void setRoasted (Boolean roasted) { this.roasted = roasted; ]
}
Assume a controller has created an instance of this bean, called setRoasted (true), and
inserted the bean into the application scope using the name 'myBean'.
A JSP contains these two tags:
<jsp: useBean id = 'aBean' class = 'MyBean' scope = 'page' \ />
<jsp: getProprty name = 'aBean' property = 'roasted' \ />
Which is true?
A. the page will include the output false
B. the page will include the output
C. the page will report that the property roasted does not exist
D. the page will report that the syntax of the useBean tag is incorrect
E. the page will report that the syntax of the getProperty tag ls incorrect


The book says E, but I cannot understand why. I thought the right answer was A.
Could someone help me please?

Thank you