急,struts中我写的一个actionBean为什么报错?

bitiwang bitiwang 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
代码如下:
package com.laya.oproj.tp.wl.client;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;

public class ClientUserCheckAction extends Action
{

public String execute( ActionForm form,
HttpServletRequest request, HttpServletResponse response,
ActionMapping mapping )
throws Exception{

ActionErrors errors = new ActionErrors();
ClientUserCheckForm clientusercheckform = (ClientUserCheckForm)form;

String username = clientusercheckform.getUsername();
String password1 = clientusercheckform.getPassword1();
String password2 = clientusercheckform.getPassword2();
if(username.equals("wang")==false){
errors.add("USERNAME", new ActionError("cuowu"));
saveErrors(request,errors);
return (mapping.getInputForward());
}

return (mapping.findForward("success"));

}
}
编译报错:
found : org.apache.struts.action.ActionForward
required: java.lang.String
return (mapping.getInputForward());
^
found : org.apache.struts.action.ActionForward
required: java.lang.String
return (mapping.findForward("success"));
^
2 errors

请问这是怎么回事?
...全文
评论 4
收藏 已收藏
分享
返回顶部
bitiwang
Web 开发 81,108 成员 341,721 内容