隨筆-9  評(píng)論-168  文章-266  trackbacks-0
          異常:
          com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory(com.opensymphony.xwork2.ObjectFactory). - Class: com.opensymphony.xwork2.inject.ContainerImpl File: ContainerImpl.java
          解決方法:
            <filter-name>struts2</filter-name>
            <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
                <init-param>  
                  <param-name>config</param-name>  
                  <param-value>struts-default.xml,struts-plugin.xml,struts2/struts-*.xml</param-value>  
              </init-param>  
           </filter>
          即,必須添加
          struts-default.xml(必須),struts-plugin.xml(可選)二個(gè)額外的配置文件.
          原因:
          struts-default.xml是默認(rèn)配置文件,一些必須的框架參數(shù)都默認(rèn)設(shè)置在此.
          posted on 2011-06-22 15:40 紫蝶∏飛揚(yáng)↗ 閱讀(9039) 評(píng)論(3)  編輯  收藏 所屬分類: Struts1/2

          評(píng)論:
          # re: struts2 修改配置文件的默認(rèn)位置報(bào)異常的解決方法[未登錄](méi) 2011-11-30 23:59 | Tommy
          謝謝,幫我解決了一個(gè)大問(wèn)題,支持你!  回復(fù)  更多評(píng)論
            
          # re: struts2 修改配置文件的默認(rèn)位置報(bào)異常的解決方法 2015-06-14 13:42 | 網(wǎng)友
          感謝樓主。。我忘記寫(xiě)struts-default。xml了  回復(fù)  更多評(píng)論
            
          # re: struts2 修改配置文件的默認(rèn)位置報(bào)異常的解決方法[未登錄](méi) 2016-03-26 15:40 | 淹死的魚(yú)
          確實(shí)能解決問(wèn)題,感謝樓主  回復(fù)  更多評(píng)論
            
          主站蜘蛛池模板: 安丘市| 鄂托克旗| 班玛县| 铜川市| 合肥市| 南皮县| 望城县| 鄯善县| 永清县| 蕉岭县| 花莲县| 郑州市| 太和县| 达日县| 永清县| 青河县| 花莲县| 资中县| 宁乡县| 青田县| 沈阳市| 大埔区| 亚东县| 仪陇县| 化州市| 沭阳县| 墨脱县| 泽普县| 九江市| 梨树县| 六枝特区| 茂名市| 彰武县| 玛沁县| 泰兴市| 吉隆县| 泾源县| 无锡市| 长沙县| 东莞市| 汨罗市|