这是做购物车的时候遇到的一个问题 ,一个类AddItemToCart继承Action类,覆盖了execute方法,然后再jsp页面做控制,调用该方法,但是确报java.lang.VerifyError异常,这是为什么?这个问题郁闷了好几天了,希望大家可以帮忙解决!!

解决方案 »

  1.   

    HTTP status 500-type Exception reportmessagedescription:The server encountered an internal error () that prevented it from fullfilling this requestexception 
    javax.servlet.ServletException:Servlet execution threw an exceptionroot cause
    java.lang.VerifyError:(class:com/lee/shopping-cart/action/AddItemtoCartAction,method:execute signature:()Lorg/apache/struts/action/Action/ActionForm;..)
      下面就是堆栈信息,没有设计到我程序代码中的部分!
      

  2.   

    public class AddItemtoCart extends DispatchAction
    {
        public ActionForward add(ActionMapping mapping,ActionForm     form,HttpServletRequest request,HttpServletResponse) throws Exception
        {
    实现部分
    }
     
    }