Struts中taglib标签的问题

本文来自:http://www.itzhe.cn/html/web/JSP/20071108/16097.html

name:
The attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized.

property:
Name of this input field, and the name of the corresponding bean property if value is not specified. The corresponding bean property (if any) must be of type String.

<网友回复>我在学习struts的时候也有这样的问题。
其实把struts标签与html标签比较的话, <html:hidden >中property属性就相当于html <input type= "hidden " >中的name.而此处的name则是保存在request或session等范围里的变量名。
就比如说我在后台里request.setAttribute( "aa ", "nihao! ");然后我就可以在页面上用 <html:hidden property= "test " name= "aa "/ >这样就能把nihao给了hidden元素了。

你可能感兴趣的:(html,jsp,bean,Web,struts)