Struts2中Action接收参数的方法
隐藏起来 2010-11-07 05:28:12 网络上有这样的方法
使用Action的属性接收参数:
a.定义:在Action类中定义属性,创建get和set方法;
b.接收:通过属性接收参数,如:userName;
c.发送:使用属性名传递参数,如:user1!add?userName=Magci;
但是当我对按上面的做,为什么接收不到参数呢?
如
在action里面创建了showChildTreeId 属性,创建get和set方法
然后在*********/action名字?showChildTreeId=11111
当我输出时,showChildTreeId 为空
这是怎么回事?
求解