Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在文本字段中使用自定义对象的值。它是通过EL表达式还是其他方式完成的?如下所述,Scriplets 不起作用
<s:textfield label="Login" name="loginName" value=<%=temp.getLoginName()%>/>
您需要从您的操作中为自定义对象提供一个 getter,并为其“值”提供一个 getter,然后执行以下操作:
<s:textfield value="%{customObject.value}"/>