public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors=new ActionErrors();
if((userName==null)||(userName.length()<1))
{
errors.add("userName",
new ActionError("jsp.hello.error"));//(HelloForm.java:43)提交的时候返回这行错误。要怎么改呢?jsp.hello.error在applicationResourceProperties里有定义:jsp.hello.error=this is error!!!!
}
return errors;
}
HttpServletRequest request) {
// TODO Auto-generated method stub
ActionErrors errors=new ActionErrors();
if((userName==null)||(userName.length()<1))
{
errors.add("userName",
new ActionError("jsp.hello.error"));//(HelloForm.java:43)提交的时候返回这行错误。要怎么改呢?jsp.hello.error在applicationResourceProperties里有定义:jsp.hello.error=this is error!!!!
}
return errors;
}
解决方案 »
- Myeclipse 不报错 急死了
- 基于Web的3D智能虚拟人
- 请教个很纠结的问题
- 发布一个消息框架
- 急急急!关于webservice的问题
- 关于scoket连接FTP服务器的登录问题,请各位帮我看一下了.先谢了!
- 急!使用WebSphere 服务器数据源连接Oracle数据库,查出数据和数据库中数据不一致!
- JAVA EE 5.0问题
- 容器维护持续性的session bean里面用到了两个数据库,总出错怎么办?
- No Hibernate Session bound to thread, and configuration does not allow creation
- 如何让SpringAOP去拦截struts DispatchAction中的方法
- 0.5*Math.log((1+Math.sin(x))/(1-Math.sin(x)))=y 现在知道了y=100 如何求x的值?
new ActionError("jsp.hello.error"));//(HelloForm.java:43)提交的时候返回这行不应该是ActionError对象的,这个是struts1.0的版本的错误对象的