急、struts2跳转问题,求大侠们帮助 我用chain跳转就报错,而我有redirectAction跳转就能正常跳过去,找半天都没看到哪里有问题用chain就报找不到方法的错 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 chain在action跳转的时候是共享ActionContext的。目测你转向的action使用了上一个action中的某些属性吧 chain 跳转页面提交的参数也跟着一起提交到下个action 也就是条船的action中没有接受变量的get 和set 方法 说错了没有接受变量的set 方法 我就这样设置的啊,但就是转不过来,用redirectAction就可以跳过来用chain跳就报错 从楼主的异常和struts2的配置文件你的错误应该是在<result name="newsListToIndex_success" type="chain">Looks_listToIndex.action</result>这个.action struts2认为listToIndex.action这个都是LooksAction里面的方法名,我如果没猜错楼主应该是cn.tt.action.LooksAction有个name="Looks_*" method="{1}"的action配置。struts2把listToIndex.action包含.action都认为是Looks_后面的整体了也就是method变成了listToIndex.action所以才报出这个找不到方法的异常。为了不让struts2把.action也认为是方法那可以在<result name="newsListToIndex_success" type="chain">Looks_listToIndex.action</result>这样改<result name="newsListToIndex_success" type="chain"><param name="actionName">Looks_listToIndex</param>利用ChainResult的actionName来识别action就不用加.action的后缀了</result> 不好意思,今天上午没看回复,刚刚我试了一下你说的这样子,不报错了,但是它还是不进去listToIndex方法,用redirectAction就可以进去,我把.action后缀都去了 刚刚我代码写错了一个地方,可以了,真的是.action后缀的问题,用chain就跳不过去,是这个原因,太谢谢拉 aspose word 目录文本域更新 与 oracle clob字段存放 tomecat 【求助】JavaScript验证验证码错误问题。。。 jsp图片批量上传 <jsp:plugin>的code属性怎样指定class文件才能让页面包含applet jstl select 下拉框的问题?? 在jsp中如何自定义函数?我是新手,很急 用java怎样实现在线留声功能啊,就像chinaren的同学录一样! JSP中URL的乱码问题!(传递中文) 求高手,大神帮忙看看..... 求助!AXIS2报Connection timed out: connect
也就是条船的action中没有接受变量的get 和set 方法
说错了没有接受变量的set 方法
我就这样设置的啊,但就是转不过来,用redirectAction就可以跳过来
用chain跳就报错
<result name="newsListToIndex_success" type="chain">Looks_listToIndex.action</result>
这个.action struts2认为listToIndex.action这个都是LooksAction里面的方法名,我如果没猜错楼主应该是cn.tt.action.LooksAction有个name="Looks_*" method="{1}"的action配置。struts2把listToIndex.action包含.action都认为是Looks_后面的整体了也就是method变成了listToIndex.action所以才报出这个找不到方法的异常。为了不让struts2把.action也认为是方法那可以在<result name="newsListToIndex_success" type="chain">Looks_listToIndex.action</result>这样改
<result name="newsListToIndex_success" type="chain">
<param name="actionName">Looks_listToIndex</param>利用ChainResult的actionName来识别action就不用加.action的后缀了
</result>