神秘的 J2ee 殿堂

          ·古之學者必有師·做學者亦要做師者·FIGHTING·

          Spring容器的啟動方法

          一、在web.xml中配置Spring容器的啟動 (通用的方法)
          <context-param>
               
          <param-name>contextConfigLocation</param-name> 
               
          <param-value>/WEB-INF/classes/applicationContext.xml</param-value>  
                                 
          //如有多個spring配置文件用逗號隔開
           </context-param>
               
          <!-- 通過Listener配置Spring容器隨Web應用的啟動而初始化 -->
          <listener>
               
          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
          </listener>

          二、struts1的啟動方法
          <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
              
          <set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml,
                         /WEB-INF/action-servlet.xml" />
          </plug-in>
          <轉>

          posted on 2007-10-11 15:50 月芽兒 閱讀(1170) 評論(0)  編輯  收藏 所屬分類: J2EE學習摘錄

          導航

          統計

          常用鏈接

          留言簿(2)

          隨筆分類

          隨筆檔案

          相冊

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 山西省| 巴塘县| 齐齐哈尔市| 新建县| 青川县| 阿城市| 黄浦区| 彭州市| 兴化市| 贵港市| 德昌县| 鄂尔多斯市| 昌平区| 东阳市| 临安市| 新建县| 铁力市| 全椒县| 沁水县| 新巴尔虎右旗| 封开县| 双峰县| 青川县| 千阳县| 化州市| 宝应县| 体育| 余庆县| 新化县| 海伦市| 兴仁县| 镇江市| 大渡口区| 黄冈市| 贵南县| 鞍山市| 渝北区| 五家渠市| 垦利县| 雷波县| 玛曲县|