bean:struts标签取回Struts的内部对象formBean、forward或mapping的值,然后用id绑定到page作用域中(这种绑定是为了其它标签能够使用该值),并创建对应的scripting变量(这种变量是为了JSP脚本能够使用该值)。
下面的代码片段示例了bean:struts标签取出listForm对象,让我们先来看一下listForm的定义在读代码:
<!-- listForm的定义<form-bean name="listForm"
type="org.solo.struts.form.ListForm" /> -->
<bean:struts id="listFormBean" formBean="listForm"/>
name:<bean:write name="listFormBean" property="name"/><br/>
type:<bean:write name="listFormBean" property="type"/><br/>
dynamic:<bean:write name="listFormBean" property="dynamic"/><br/>
上面代码运行的结果为:
name:listForm
type:org.solo.struts.form.ListForm
dynamic:false
5880

被折叠的 条评论
为什么被折叠?



