SendMail sm=new SendMail();这里面有异常

解决方案 »

  1.   

    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) 修改为:
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) throws Exception看看
      

  2.   

    try{
    SendMail sm=new SendMail();
    }
    catch(Exception e){;}
      

  3.   

    我觉得这个问题  与struts关系不大  原因在于你的SendMail类  有异常或者错误发生!
      

  4.   

    SendMail sm=new SendMail();
    看这个类的源码
      

  5.   

    所有异常都要在适当的地方捕获,不要吃掉.
    (千万不要随意的 catch(Exception e){} 然后什么也不做).对于代码中的异常,如果你觉得 catch之后确实不需要作任何处理,那也至少添加注释 
    // Swallow , 可以不处理, 之类的注释,
    并且应该在 debug 时打印出异常来,只不过不用再抛了.