<%
Users user=(Users)session.getAttribute("userInfo");
%>
<s:textfield name="username" value=""></s:textfield>
value值里面要怎么写才能够拿到user里的username的值?
试过好多种方法都不行
<s:textfield name="username" value="${user.username}"></s:textfield>
<s:textfield name="user.username" value="${username}"/>
<s:textfield name="user.username" value="#request.username"/>
直接用<%=user.getUsername()%>也不行!
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
登陆后我把用户信息放到session里,用户想修改的时候我想给他显示以前的值,请问要怎么做才能让textfield 里显示user里的username值?谢谢!
Users user=(Users)session.getAttribute("userInfo");
%>
<s:textfield name="username" value=""></s:textfield>
value值里面要怎么写才能够拿到user里的username的值?
试过好多种方法都不行
<s:textfield name="username" value="${user.username}"></s:textfield>
<s:textfield name="user.username" value="${username}"/>
<s:textfield name="user.username" value="#request.username"/>
直接用<%=user.getUsername()%>也不行!
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
登陆后我把用户信息放到session里,用户想修改的时候我想给他显示以前的值,请问要怎么做才能让textfield 里显示user里的username值?谢谢!