Action源吗:
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm,
HttpServletRequest Request, HttpServletResponse Response) {
/**@todo: complete the business logic here, this is just a skeleton.*/
ryjbActionForm ryjbForm = (ryjbActionForm) actionForm;
ActionForward actionForword=null;
ActionErrors errors=new ActionErrors();
String name=ryjbForm.getKqkh();
String pw=ryjbForm.getPw();
if(name.trim().equals("")||pw.trim().equals(""))
{
ActionError error=new ActionError("sdfsd");
errors.add("ActionErrors.GLOBAL_ERROR",error);
}
if(errors.size()>0)
{
saveErrors(Request,errors);
return new ActionForward(actionMapping.getInput());
}else
{
ObjLookUp JndiLu = new ObjLookUp();
try {
Object object = JndiLu.getLookUp("ryjb");
ryjbHome fHome = (ryjbHome) PortableRemoteObject.narrow(object,
ryjbHome.class);
ryjb Aryjbs = fHome.create();
int isDL = Aryjbs.isLogin(ryjbForm.getRybh(), ryjbForm.getPw());
if (isDL == 1) {
actionForword = actionMapping.findForward("sucess");
System.out.println(isDL);
}
else {
actionForword = actionMapping.findForward("failer");
}
}
catch (Exception e) {
e.getMessage();
}
}
return actionForword;
}
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm,
HttpServletRequest Request, HttpServletResponse Response) {
/**@todo: complete the business logic here, this is just a skeleton.*/
ryjbActionForm ryjbForm = (ryjbActionForm) actionForm;
ActionForward actionForword=null;
ActionErrors errors=new ActionErrors();
String name=ryjbForm.getKqkh();
String pw=ryjbForm.getPw();
if(name.trim().equals("")||pw.trim().equals(""))
{
ActionError error=new ActionError("sdfsd");
errors.add("ActionErrors.GLOBAL_ERROR",error);
}
if(errors.size()>0)
{
saveErrors(Request,errors);
return new ActionForward(actionMapping.getInput());
}else
{
ObjLookUp JndiLu = new ObjLookUp();
try {
Object object = JndiLu.getLookUp("ryjb");
ryjbHome fHome = (ryjbHome) PortableRemoteObject.narrow(object,
ryjbHome.class);
ryjb Aryjbs = fHome.create();
int isDL = Aryjbs.isLogin(ryjbForm.getRybh(), ryjbForm.getPw());
if (isDL == 1) {
actionForword = actionMapping.findForward("sucess");
System.out.println(isDL);
}
else {
actionForword = actionMapping.findForward("failer");
}
}
catch (Exception e) {
e.getMessage();
}
}
return actionForword;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货