牛仔褲的夏天

          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
          主站蜘蛛池模板: 阳朔县| 贵德县| 柳林县| 红原县| 通山县| 鲜城| 安乡县| 洛扎县| 泾源县| 罗田县| 夏河县| 哈尔滨市| 瓮安县| 黑水县| 平武县| 邻水| 平顶山市| 桂平市| 凤阳县| 山阴县| 通渭县| 高州市| 朝阳市| 宜川县| 建德市| 伊宁市| 南澳县| 平顺县| 油尖旺区| 沈丘县| 珲春市| 龙川县| 尉犁县| 丹阳市| 通城县| 宜阳县| 东方市| 湖南省| 衡山县| 马山县| 成武县|