问题,百思不得其解,遮住脸再来问!
hzxbl 2005-09-01 09:08:56 jsp:
<html:errors />
struts-config:
<action-mappings>
<action path="/IndexAction" type="hzxbl.IndexAction"
name="IndexForm" scope="request" validate="true"
input="/index.jsp">
<forward name="ok" path="/index.jsp" />
</action>
</action-mappings>
IndexForm:
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){
ActionErrors errors=new ActionErrors();
if((userName==null)||(userName.length()<1))
errors.add("userName",new ActionMessage("hello.no.username.error"));
return errors;
}
ApplicationResources.properties
hzxbl.no.username.error=no user name
用bean:message能输出信息
struts1.1 jdk1.5
为什么就不显示呢?我查了论坛的帖子,好象我没有他们的问题!奇怪啊,各位大大帮我看看