关于struts2的xml中参数有关问题
关于struts2的xml中<result type="redirect">参数问题
今天做项目的时候,遇到一个奇葩问题。我需要在struts的xml中的<action>的<result>中配置type="redirect",同时需要传参进去。试了老半天,我的别的参数都好着,就flag参数不好,纠结死了都快。后来,突然想想,改一下,说不定是什么关键字之类的,就把flag改成了showflag了,竟然奇迹般的好了!!!特此记录。有类似问题的大家还是不要直接写flag比较好。
<result name="success" type="redirect">test.action?id=${id}&showflag=${showflag}</result>
<result name="error">/error.jsp</result>