求助高手!我的项目中Struts2的版本是2.0的,配置文件中有需要跳转action,代码如下:
<action name="documentRequestDispatcherAction" class="catalogAcitonBean" method="documentRequestDispatcher">
<result name="lis" type="chain">getReportList</result>
<result name="ris" type="chain">getRISReportList</result>
<result name="case" type="chain">case</result>
<result name="lhsum" type="chain">summary</result>
</action>
但是导入到我的myeclipse中后下面全都是红线,为什么啊?别人的就没问题,是不是我myeclipse的版本问题,我的是8.6的。
改成redirect虽然没有红线了,但是运行报404的错,但是控制台不报错。
redirect和chain有什么区别?
谢谢各位大神解答

解决方案 »

  1.   

    chain 是action跳action
    redirect 是JSP跳JSP 这种跳转是重定向,会丢失action的处理结果。区别是,只有chain的路劲不用“/”。
      

  2.   

    404是没有找到请求的页面或action,肯定配置出问题了!把你的整个action粘上来看看啦
      

  3.   

    <action name="HealthArchiveReqDispatch" class="firstPageAbsActionBean" method="HealthArchiveRequestDispatcher">
    <result name="gxygl" type="chain">hypertensionManage</result>
    <result name="tnbgl" type="chain">diabetesManage</result>
    <result name="etbjk" type="chain">childAction</result>
    <result name="ycfgl" type="chain">ListPregnantCardInfo</result>
    <result name="gnqgl" type="chain">initMenopauseHealthCard</result>
    <result name="fkgl" type="chain">gynecologyManage</result>
    </action>
      

  4.   

    chain用来action之间的跳转
    redirect只能用来跳转页面建议楼主 多查查 struts2文档 写的很完美了
      

  5.   

    我知道chain是跳转页面 我现在纠结的是为什么我这action下面整个都画红线啊
      

  6.   

    不是,打错了,chain跳转action,但是真的不知道为什么划红线啊
      

  7.   

    这是红叉叉报的错:
    Multiple annotations found at this line:
    - Undefined actionName parameter
    - Undefined actionnamespace 
    这是整个action
    <action name="HealthArchiveReqDispatch" class="firstPageAbsActionBean" method="HealthArchiveRequestDispatcher">
    <result name="gxygl" type="chain">hypertensionManage</result>
    <result name="tnbgl" type="chain">diabetesManage</result>
    <result name="etbjk" type="chain">childAction</result>
    <result name="ycfgl" type="chain">ListPregnantCardInfo</result>
    <result name="gnqgl" type="chain">initMenopauseHealthCard</result>
    <result name="fkgl" type="chain">gynecologyManage</result>
    </action> 
      

  8.   

    getReportList
    getRISReportList
    case
    summary
    这些是存在的action,你没有配置
      

  9.   

    拜托你把actio.xml贴完整了!<action name="HealthArchiveReqDispatch" class="firstPageAbsActionBean" method="HealthArchiveRequestDispatcher">
    有这个firstPageAbsActionBean类吗