The First 2 Options (A,B) are correct. The CustomerBean instance is looked for in the session with the attribute "cust" & If it doesn't exist then a new one will be created.
Above statement will look for CustomerBean object in session stored against id cust. If not found it will create one.
It will try to locate CustmerBean insession against id cust and it will use type value as reference of the object in generated servlet. For the above statement the object must be in scope else it will generate error (it will not create new object).
For this statement it will try to locate CustomerBean object in mentioned scope and if not found it will create new object and store it in mentioned scope.
Guys I am doubted about last statement. Please confirm
"Know where to find the solution and how to use it - that's the secret of success."
I agree with you Bess - I think only (B) is correct.
If you refer to HFSJ pg 354 then when <jsp:useBean> is used with the "type" attribute then the object must already exist, otherwise an InstantiationExeption with occur.
My question is like yours - what is the other correct answer?