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

bitiwang 2004-05-05 01:13:46
代码如下:
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

请问这是怎么回事?
...全文
16 4 打赏 收藏 举报
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
shsunv 2004-05-06
同意 VVV_lucky(*太阳*)
  • 打赏
  • 举报
回复
Honeymaster 2004-05-05
up
  • 打赏
  • 举报
回复
zengzz 2004-05-05
同意楼上的
  • 打赏
  • 举报
回复
VVV_lucky 2004-05-05
public String execute( ActionForm form,
HttpServletRequest request, HttpServletResponse response,
ActionMapping mapping )
throws Exception{

改成
public ActionForward execute( ActionForm form,
HttpServletRequest request, HttpServletResponse response,
ActionMapping mapping )
throws Exception{
  • 打赏
  • 举报
回复
相关推荐
发帖
Web 开发
加入

8.0w+

社区成员

Java Web 开发
社区管理员
  • Web 开发社区
申请成为版主
帖子事件
创建了帖子
2004-05-05 01:13
社区公告
暂无公告