1.页面
<%@taglib prefix="s" uri="/struts-tags"%>
2.struts.xml (ps:method {1})
3.struts.properties
struts.custom.i18n.resources=messageResource
4.web.xml
5.Action
extends ActionSupport implements Action ModelDriven
public String execute() throws Exception{
ActionContext.getContext()
}
public void validate()
{addFieldError("username", getText("user.required"));
}
6.Converter
extends StrutsTypeConverter
{public Object convertFromString(Map context, String[] values, Class toClass)
public String convertToString(Map context, Object o)
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9952596/viewspace-573373/ ,如需转载,请注明出处,否则将追究法律责任。