牛仔褲的夏天

          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 閱讀(378) 評論(0)  編輯  收藏 所屬分類: Struts & Hibernate
          主站蜘蛛池模板: 泸州市| 阳山县| 台湾省| 漳平市| 辉南县| 璧山县| 大竹县| 沙田区| 麻江县| 阜南县| 调兵山市| 孝昌县| 甘南县| 宜春市| 定兴县| 永靖县| 察雅县| 壤塘县| 灵寿县| 八宿县| 隆德县| 淳安县| 林周县| 咸宁市| 乐昌市| 浪卡子县| 留坝县| 大同市| 开化县| 三河市| 铁岭市| 徐汇区| 河南省| 许昌县| 阳朔县| 鄂州市| 聊城市| 阿城市| 昌平区| 卫辉市| 房产|