日期:2014-05-18  浏览次数:20615 次

有两个jsp页面对应一个同一个action 问题
有两个jsp页面对应一个同一个action   时,那个Input   要如何赋值?
还是把action写成两个?
<action
            attribute= "scheduleForm "
            input= "/pages/scheduleadd.jsp "        
            name= "scheduleForm "
            path= "/schedule "
            scope= "request "
            type= "cn.fzu.action.ScheduleAction "
            validate= "false ">
            <forward   name= "schedule "   path= "/pages/schedule.jsp "   />
</action>

<action
            attribute= "scheduleForm "
            input= "/pages/schedule.jsp "        
            name= "scheduleForm "
            path= "/schedule "
            scope= "request "
            type= "cn.fzu.action.ScheduleAction "
            validate= "false ">
            <forward   name= "schedule_find "   path= "/pages/schedule_find.jsp "   />
</action>
   
  当写成上面这样时,在Eclipse环境里把struts-config.xml从源码模式转换成设计模式时会出错,是不是不能写成上面这样子?
有没有什么解决方法?


------解决方案--------------------
lz干嘛非要写input属性呢。 <action> 元素里嵌套两个 <forward> 子元素就可以了。
------解决方案--------------------
两个action的path都一样 改成schedule1 schedule2就可以了
------解决方案--------------------
action?? 是form 的action吗? 怎么这么多属性啊
------解决方案--------------------
你validate都等于false了
就不用input来返回出错跳转页面了呀
直接把input都去掉
------解决方案--------------------
同意一楼的观点
------解决方案--------------------
同上