Twon thing I'd like to point out in this page which I don't think is correct:
1.> In the "Key points and gotchas" column the last point says:
If the target expression is a bean, but the bean does not have a property that matches "property", the Container throws an exception. But be careful, because the EL expression by itself will NOT cause an exception to be thrown if the property doesn't exist. So even though : ${fooBean.notAProperty} won't cause an exception by itself(it just returns null), if that same "notAProperty" is the value of a "target" attribute, the Container throws an exception.
This is NOT TRUE...if you use ${fooBean.notAProperty} and the property "notAProperty" is not a property of this bean, the container throws an ELException.
2.>Just beside this column, in the Q & A section, the second one reads:
Q: If I don't specify a scope, does that mean it will find attributes that are ONLY within page scope, or does it do a search beginning with page scope?
A: If you don't use the optional "scope" attribute in the tag, and you're using "var", the container will search scopes in the order in which you've come to expect--page, then request, then session, then application(context).
If you use the var version without a scope, and the Container can't find an attribute of that name in any of the 4 scopes, the Container makes a new one in page scope.
What exactly is implied here? Did they mean that if the Container finds an attribute of that name in any of the 4 scopes( say application scope) then it's replaced by this one in that scope.....or is it meant that if an attribute is found in any of the four scopes then the new value is not set?
Well, both don't hold good....If you don't specify a "scope", the Container sets the new attribute in the page scope...I've tried it out and that's what I've got.
Could anybody please confirm this.....it would be very helpful....
Many thanks in advance.