我现在需要把一个action(action1)中的变量传递到另外的一个action(action2)中,两个action中都定义了属性
String userId,User user,并且定义了相应的getter,setter方法,在struts.xml中配置如下:
Action2
/
${user}
${userId}
test
/index_notLogin.jsp
执行时,action2成功调用,但是里面的变量(userId,user)全为null。
为什么?
有帖子说,把type换成“chain”,我换了,还是null。
[b]问题补充:[/b]
blareck:
我的两个action中有同名的参数,并且有getter,setter,为什么还是null?