求助高手!我的项目中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有什么区别?
谢谢各位大神解答
<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有什么区别?
谢谢各位大神解答
解决方案 »
- 合并传值,怎么传?急用
- 有关开发JSP网站的问题,进来看看 谢谢
- 关于server \web server\servlet
- 部个关于JSP局部更新问题...急急!!!!!!!!
- linux5 安装 oracle10
- while(rs.next())循环后没有最后一条记录
- 求助!关于OA配置问题;(急)
- Tomcat4报错如下:Can't get a connection,pool exhaust
- 请问能不能直接用jdbc连到access数据库呢?
- hibernate 三层以上关联 比如classA,classB,classC之间的关联关系为一对多对多,之间的关联关系如何配置
- 关于web系统吃linux内存情况
- 多个tomcat使用同一个IP
redirect 是JSP跳JSP 这种跳转是重定向,会丢失action的处理结果。区别是,只有chain的路劲不用“/”。
<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>
redirect只能用来跳转页面建议楼主 多查查 struts2文档 写的很完美了
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>
getRISReportList
case
summary
这些是存在的action,你没有配置
有这个firstPageAbsActionBean类吗