struts2的action配置了返回类型为json就是ajax请求的数据就不能配置其他返回视图了吗,比如我想在这个Action中返回一个jsp
也就是我想在一个Action中即配置json返回也想配置jsp这种形式是不行的吗?如果可以该怎么配,如果不可以我就只能做成两个action了!!!actionstrutsjsonajaxjsp

解决方案 »

  1.   

    <action name="mcoadhocCharges_*" class="intranet.pc.adchrg.action.MCOAdhocChargesAction" method="{1}">
      <result name="search">/WEB-INF/pages/pc/authority/mcoAdhocCharges/mcoAdhocChargesSearch.jsp</result>
      <result name="searchview">/WEB-INF/pages/pc/authority/mcoAdhocCharges/mcoAdhocChargesSearchView.jsp</result>
      <result name="vesselchargesdetails">/WEB-INF/pages/pc/authority/mcoAdhocCharges/vesselchargesdetails.jsp</result>
      <result name="ajax" type="json"></result>
      <result name="input">/WEB-INF/pages/pc/authority/mcoAdhocCharges/mcoAdhocChargesSearch.jsp</result>
     </action>我这样配置就不行
      

  2.   

    Unable to load configuration. - action - file:/D:/MPAAPP/source_code/trunk/DEV/MPASYSTEMS/intranet-web/src/main/webapp/WEB-INF/classes/struts/pc/struts-pc-authority.xml
      

  3.   

    struts-pc-authority.xml加载不了这个配置文件。
      

  4.   

    so this ne ! but i think two action is good
      

  5.   

    我删掉那个json的result就可以运行了,shit!!人都要崩溃了
      

  6.   

    我删掉那个json的result就可以运行了,shit!!人都要崩溃了
      

  7.   

    竟然被我搞定了~~我靠!!我自己的问题!!不晓得什么时候冲突了没把冲突的<<<<<<me删掉!!靠!!见笑了!!!