再请教一个,string属性值为"1",struts怎么输出<input type=checkbox checked>

解决方案 »

  1.   

    <logic:present name="testformbean">
    <html:text name="testformbean" property="id" />
    <html:text name="testformbean" property="name" />
    </logic:present>
      

  2.   

    是不是还要加上:
    <logic:notpresent name="testformbean">
    <input name="id" >
    <input name="name" >
    </logic:notpresent>
    要只能这么做struts也太弱了
      

  3.   

    我觉得是你的用法不好。
    这个做法,为什么不直接用ActionForm,而去套一个FormBean?
    用ActionForm不会有你这样的问题了。