你想让它执行什么方法都可以。。看你怎么配Struts中的Parameter差数

解决方案 »

  1.   

    把他自己添加的方法删了
      想调用那个方法,就在页面,提交、Action中Parameter=“方法名”
      

  2.   

    都是先执行hhiaction中execute方法的,那个方法里面写了方法就是调用你的传递的参数的方法
      

  3.   

        <!-- 商品信息管理,添加,修改,删除,更新 -->
        <action
          attribute="productInfoForm"
          name="productInfoForm"
         parameter="method"
          path="/SysManager/productInfo"
          scope="request"
          validate="true"
          input="/SysManager/pinfo_add.jsp"
          >
          <forward name="ProductInfoFail" path="/SysManager/opError.jsp" />
          <forward name="GetProductInfoSuccess" path="/SysManager/pinfo_oneShow.jsp" />
          <forward name="AddProductInfoSuccess" path="/SysManager/productInfo.do?method=showProductInfo" />
          <forward name="deleteProductInfoSuccess" path="/SysManager/productInfo.do?method=showProductInfo" />
          <forward name="ShowProductInfoSuccess" path="/SysManager/pinfo_show.jsp"></forward>
        </action>       < a href="newsInfo.do?method=showNewsInfo"></a>
      

  4.   

    楼上正解,在action里写个showNewsInfo()方法,等你页面调用的时候就直接调用该方法了
      

  5.   

    一般继承DispatchAction
    的都不会用execute这个方法了 
    一般都是自己写方法
    只是方法申明相同而方法名不同的方法
    然后调用和7楼说的一样
    不知道楼主是打算做什么
      

  6.   

    看看书啦
    难道还不知道DispatchAction怎么用?
      

  7.   

    只有四楼的回答符合要求,其它的都没看清楚问题,我又不是问dispachaction怎么用