书上说:
a jsp:useBean element results in a new bean being instantiated only if no bean with the same id and scope can be found. If a bean with the id and scope is found, the preexisting bean is simply bound to the variable referenced by id.但实际上,我通过程序的测试发现,<jsp:useBean .... />根本就是执行了create,而不是bound啊能解释一下吗?
a jsp:useBean element results in a new bean being instantiated only if no bean with the same id and scope can be found. If a bean with the id and scope is found, the preexisting bean is simply bound to the variable referenced by id.但实际上,我通过程序的测试发现,<jsp:useBean .... />根本就是执行了create,而不是bound啊能解释一下吗?
a jsp:useBean element results in a new bean being instantiated only if no bean with the same id and scope can be found. If a bean with the id and scope is found, the preexisting bean is simply bound to the variable referenced by id.from: Java Servlet Programming(Jason Hunter)
<jsp:useBean>
<jsp:setProperty></jsp:setProperty>
</jsp:useBean>这种写法
“the statement between (<jsp:useBean> .... </jsp:useBean>) executed only if a new bean is created, not if an existing bean is used. "这个应该是比较正确的说法