不用value属性,你在Action中用setText1方法对Form中的text1进行赋值就可以了。

解决方案 »

  1.   

    我是曾这样做过,直接对ActionForm的成员赋值,但是,页面没有出现赋得值.
    帮我想想,可能是哪里出错了?
      

  2.   

    你再用<html:text property="text1" value='<bean:write name="bean1" property="text1">' /> 看看。这样的话应该是可以的。当然你得保证你form里面有初始化的值。
      

  3.   

    不行:(,结果是把<bean:write name="bean1" property="text1">输出到了文本框
      

  4.   

    试下<html:text property="text1" value="<bean:write name='bean1' property='text1'>" /> :)
      

  5.   

    加上private String text1 = "asdsd";
      

  6.   

    那你再试试下<html:text property="text1" value='<bean:write name='bean1' property='text1'>' /> 你都试一下就是了,你的问题比较怪:)
      

  7.   

    <input name="text1" type="text"  value="<bean:write name='element' property='text1'>">举一反三嘛!~多试试几个,肯定可以的,嘿嘿