急,struts中我写的一个actionBean为什么报错?
代码如下:
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
请问这是怎么回事?