解决方案 »

  1.   

    会不会加多一个括号的问题呢?struts2我也不是很清楚,也属于初学当中
    你可以试下<s:textfield name="username" value=[color=#FF0000${user.username}][/color]> </s:textfield> 
    ][/color]
      

  2.   

    会不会加多一个括号的问题呢?struts2我也不是很清楚,也属于初学当中 
    你可以试下 <s:textfield name="username" value=${user.username}> </s:textfield> 
    ][/color]
      

  3.   


    <s:textfield name="username" value=${user.username}> </s:textfield> 
    不能在ognl中使用EL表达式。
    <s:textfield name="username" value="user.username"> </s:textfield> 
      

  4.   

    问题解决了,感觉各位参与
    方法有两种,若action中没有设置set\get方法,jsp中只能用:
    value="%{#user.username}"或value="%{#request.user.username}"
    不能直接用el表达式