由struts-config.xml中心配置 高屋建瓴
其中担任系统核心控制器的ActionServlet主要负责控制转发
业务逻辑控制器的Action
JSP过来的Http请求
先经由ActionServlet 表单数据给ActionForm
由ActionServlet根据用户请求来决定是否将请求转发给Action 否则直接转向请求的JSP
但业务逻辑控制器本身并不具有处理能力 而是调用Model来处理

解决方案 »

  1.   

    模块根据xml自建或工具建 <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"><struts-config>
      <data-sources />
      <form-beans >
        <form-bean name="loginForm" type="com.wscz.struts.form.LoginForm" />
        <form-bean name="testForm" type="com.wscz.struts.form.TestForm" />
        <form-bean name="TestBean" type="myPackage.TestBean" />  </form-beans>  <global-exceptions />
      <global-forwards />
      <action-mappings >
        <action
          attribute="loginForm"
          input="/errors.jsp"
          name="loginForm"
          path="/login"
          scope="request"
          type="com.wscz.struts.action.LoginAction">
          <forward name="suc" path="/login_success.jsp"></forward>
          <forward name="fal" path="/login_failure.jsp"></forward>
          </action>
        <action
          attribute="testForm"
          input="/test.jsp"
          name="testForm"
          path="/test"
          scope="request"
          type="com.wscz.struts.action.TestAction" />  </action-mappings>  <message-resources parameter="com.wscz.struts.ApplicationResources" />
    </struts-config>
      

  2.   

    模块用Eclipse创建的具体步骤是怎样的,请详细说明一下功夫 谢了
      

  3.   

    分模块用Eclipse创建的具体步骤是怎样的,请详细说明一下 谢了
      

  4.   

    action包,dao包,vo包,service包等。
      

  5.   

    把2楼的代码复制下来,在你的项目里面建立文件名叫web.xml,粘贴上去
      

  6.   

    建议看下《Struts实用开发指南》,上面讲的很清楚
      

  7.   

    web.xml
      才是高屋建瓴
    在<init-param>可以多个struts-config 初始声明也可以分模块的
    struts-config.xml
      文件可以进行很好的独立模块配置!
    然后加载在web.xml中