如何在struts2,validator中提交页面自定义error的显示位置 我在学习struts2的过程中,发现验证的时候,错误提示总在字段旁边,我如何设置才能让他在字段旁边不显示,而只显示在我写<s:actionerror />或<s:fielderror />的地方 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 页面:<html:errors property="us" />Action: ActionErrors errors=new ActionErrors(); errors.add("zs",new ActionError("us.ccc")); saveErrors(request,errors);资源文件:us.ccc=<font color=red>错误提示</font> 楼上的意思是不是说把错误都赋给一个form中不存在的字段,然后指定这个字段显示位置 你是做后台验证还是前台ajax验证啊? 现在是做前台验证,但不是ajax的,希望点击提交的时候先做客户端验证 页面: <html:errors property="us" />Action: ActionErrors errors=new ActionErrors();errors.add("zs",new ActionError("us.ccc"));saveErrors(request,errors);资源文件:us.ccc= <font color=red> 错误提示 </font>---------------------------------------------------------------------------------------------------------<html:errors property="us" />property=us,那你errors.add("zs",new ActionError("us.ccc"));"zs"应该改成us <html:erros property="us" />放到你想显示的地方不就好了 form的theme属性设成simple<s:form action="" theme="simple"> ChartDirector 中文显示问题 关于Google浏览器的一个工具问题 servlet输出的表单域取值 请问打成JAR包的CLASS文件有什么办法恢复过来? 新手请教帮忙解决一个简单用户登录页面的出错 jsp如何嵌套入自己用JAVA开发的播放器 能不能把inputStream 读到byte[]中 有使用intelliJ IDEA的吗? jsp程序员是否有前途,如果没有,往那方面发展比较好! 一个事务事务的问题 在jsp程序中,能否在客户端的浏览器上显示word文件 急!!!!jsp显示word
Action: ActionErrors errors=new ActionErrors();
errors.add("zs",new ActionError("us.ccc"));
saveErrors(request,errors);
资源文件:us.ccc=<font color=red>错误提示</font>
Action: ActionErrors errors=new ActionErrors();
errors.add("zs",new ActionError("us.ccc"));
saveErrors(request,errors);
资源文件:us.ccc= <font color=red> 错误提示 </font>
---------------------------------------------------------------------------------------------------------
<html:errors property="us" />
property=us,
那你errors.add("zs",new ActionError("us.ccc"));"zs"应该改成us
<s:form action="" theme="simple">