日期:2014-05-17  浏览次数:20688 次

structs findForward()不跳转,不报错,没异常,无警告。。。
就是调试的时候说缺少一个jar包,但它明明就在那里。
下面是代码:
ProcessLogin.java
public class ProcessLogin extends Action{
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// TODO Auto-generated method stub
User user=(User)form;
LoginService loginSrv=new LoginService();
String actionpath="fail";
boolean result=loginSrv.ValidateLogin(user);
if(result){
actionpath="succ";
}
System.out.println(actionpath);
return mapping.findForward(actionpath);
}
}
structs-config.xml里的配置:
<action path="/login" type="action.ProcessLogin" scope="request" name="loginForm">
  <forward name="fail" path="/login.html"></forward>
  <forward name="succ" path="/main.html"></forward>
</action>

------解决方案--------------------
不晓得。。。。。。。。。。。
------解决方案--------------------
什么叫调试的时候缺少包还不报错