牛仔褲的夏天

          JAVA是藍色的- online

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            30 隨筆 :: 5 文章 :: 15 評論 :: 0 Trackbacks

          1.為每個模塊準備一個配置文件,如:
          ? struts-config.xml(缺省配置文件),
          ? struts-config-customer.xml,
          ? struts-config-order.xml
          每個配置文件的寫法可以參照struts-config.xml

          2.配置web.xml文件

          < servlet >
          < init - param > ???? // 缺省模塊
          ???? < param - name > config </ param - name >
          ????
          < param - value >/ WEB - INF / struts - config.xml </ param - value >
          </ init - param >

          < init - param > ????? // customer模塊
          ???? < param - name > config / customer </ param - name >
          ????
          < param - value >/ WEB - INF / struts - config - customer.xml </ param - value >
          </ init - param >

          < init - param > ????? // order模塊
          ???? < param - name > config / order </ param - name >
          ????
          < param - value >/ WEB - INF / struts - config - order.xml </ param - value >
          </ init - param >
          </ servlet >

          3.準備各個模塊所需的ActionForm、Action和JSP等資源

          在多模塊間進行全局轉發
          struts-config.xml:

          < struts - config >
          ????
          < global - forwards >
          ????
          < forword?name = “toModuleB”
          ????????contextRelative
          = true

          ????????path
          = / moduleB / index. do

          ????????redirect
          = true ”? />

          ????
          </ global - forwards >
          </ struts - config >
          posted on 2006-03-22 16:04 luckyrobbie 閱讀(382) 評論(0)  編輯  收藏 所屬分類: Struts & Hibernate
          主站蜘蛛池模板: 永靖县| 东至县| 佛学| 金门县| 文安县| 晋宁县| 武冈市| 静宁县| 乐安县| 云龙县| 波密县| 石屏县| 工布江达县| 日照市| 天门市| 枞阳县| 邹城市| 弋阳县| 乐清市| 营口市| 边坝县| 邵阳县| 盐山县| 普定县| 庆安县| 错那县| 涟源市| 精河县| 松江区| 青神县| 巴彦县| 广宁县| 城步| 商都县| 蓝山县| 盐亭县| 鄯善县| 永安市| 新建县| 义马市| 龙口市|