神秘的 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>
          <轉(zhuǎn)>

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

          導航

          統(tǒng)計

          常用鏈接

          留言簿(2)

          隨筆分類

          隨筆檔案

          相冊

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 万山特区| 田阳县| 铜鼓县| 茶陵县| 梨树县| 利津县| 哈密市| 民勤县| 清原| 黄平县| 江川县| 张北县| 望奎县| 闻喜县| 榆中县| 大冶市| 枞阳县| 焉耆| 内丘县| 临夏市| 衡南县| 吴桥县| 陆河县| 长泰县| 九龙城区| 洪泽县| 罗平县| 保定市| 大余县| 蓬溪县| 靖州| 平定县| 临汾市| 南汇区| 扬中市| 鄢陵县| 安岳县| 卢氏县| 农安县| 陇南市| 普宁市|