请教一个问题 Struts------action里的代码为什么都要执行2次
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.sunny.hyw.operationbean.Userlogin;
public class LoginAction extends Action {
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
/**@todo: complete the business logic here, this is just a skeleton.*/
Userlogin userlogin=new Userlogin();
String userID=httpServletRequest.getParameter("userID").trim();
String password=httpServletRequest.getParameter("userPASS").trim();
if(userlogin.Islogin(userID,password)){
System.out.println("aaa");
return actionMapping.findForward("success");
}
else
return actionMapping.findForward("error");
}
}
一个最简单的验证登陆的action 如果用户存在我就打印aaa 我只登陆一次,跳到这个action上
可是他出了2次aaa
为什么会这样 请教