
<html:errors property=”firstName”/>
Output the errors associated with this form with html:errors tag. ActionForms have a validate method that can return ActionErrors.
<bean:message key="userRegistration.firstName" />
When you want to output labels in the JSP from the resource bundle. Bean: message tag looks up the value in the resource bundle with the key here.
<html:text property="firstName" />
Associate the ActionForm’s properties to the HTML form’s fields.
<bean:write name="user" property="firstName" />
Actions delegate to JSP to display objects from the model
6. Action类如何与ActionForm类以及input JSP连接起来
通过 struts-config.xml配置文件

Struts表单验证
本文介绍Struts框架中使用html:error标签输出表单错误信息的方法,以及如何通过ActionForm的validate方法返回ActionErrors。此外,还讲解了如何利用bean:message标签从资源文件中输出标签,以及ActionForm属性与HTML表单字段的关联。
1071

被折叠的 条评论
为什么被折叠?



