配置一下就行了,看看帮助不就完了? 没什么难的,不过其实这个并不灵活,要想灵活就要自己写一套验证javascript,不过是有一定的难度

解决方案 »

  1.   

    你的意思是多个Action处理一个Formbean?
    我的struts-config.xml你参考一下:
    <form-beans >
        <form-bean name="regCheckForm" type="reg.form.RegCheckForm" />
    </form-beans>
    <global-forwards >
        <forward name="result" path="/result.jsp" />
        <forward name="reg" path="/reg_1.jsp" />
    </global-forwards>
    <action-mappings >
        <action
          attribute="regCheckForm"
          input="/reg_2.jsp"
          name="regCheckForm"
          path="/reg2"
          scope="session"
          validate="true"
          type="reg.action.RegCheckAction" />
        <action
          input="/reg_1.jsp"
          path="/reg1"
          name="regCheckForm"
          scope="session"
          parameter="/reg_2.jsp"
          type="org.apache.struts.actions.ForwardAction" />
    </action-mappings>
    其他都差不多这个意思了。