问答详情
源自:4-3 配置Action,Service,Dao的类-Struts2整合Spring

Unable to instantiate Action, action.ProductAction, defined for 'product_save' in namespace '/'null

Unable to instantiate Action, action.ProductAction,  defined for 'product_save' in namespace '/'null

提问者:qq_JUMPSHOOT_03956016 2017-12-16 13:54

个回答

  • 慕哥0405377
    2018-04-26 14:51:38

    可以直接用

    <s:form action="save" method="post" namespace="/" theme="simple"></s:form>

    <action  name="save" method="save" class="org.integrateSSH.action.ProductAction"></action>

  • 慕粉2213397909
    2017-12-17 18:28:37

    查看class的路径有没有写对,

    <!-- action由本身创建 -->

    <!-- <action name="product_*" method="{1}" class="org.integrateSSH.action.ProductAction">

    </action> -->


    <!-- action由spring管理创建,其中class="productAction", productAction为bean的ID-->

    <action name="product_*" method="{1}" class="productAction">

    </action>