Hi all,
in Charles Lyons book SCWCD Study Companion, on page 346 there is a question about scriptless pages and <useBean>:
question: Which are possible outcomes resultingfrom using the following in a
JSP document declared as scriptless in the dd.
<jsp:useBean id="mybean" class="net.bean.MyBean" />
He give the correct answer as:
If there is no mybean page-scoped attribute,
a new one is created containing a new instanceof net.bean.MyBean.
Ok. However in the explanation of the answer in the back of the book he says:
...D is correct, the only use for <jsp:useBean> in a scriptless environment
is to ensure a scoped variable exists.
Now, this may just be a interpretation problem; but, when I read his explanation, I tend to think he is saying that this is a
test to ensure the existence of the "id" denoted variable, that is that the variable existed prior to the use of the <useBean> action.
However in the answer D, he indicates that if the variable does not exist it will be created which I know is the behavior of the <useBean> action.
Am I reading too much into his explanation?