我使用Map作为我的接收容器,shr是一个key.
当我通过地址: http://localhost:9999/ta/aa/test.do?map.shr=feng 来传递数据时.
问题: 打印不出shr参数.的值.这是为什么? 大写可以接收的
为什么map接收不了shr属性值呢,其它的属性都能接收.
public class TestAction{为什么map接收不了shr属性呢,其它的属性都能接收.public Map<string,string> map = new HashMap<string,string>();
public Map getMap()//.....set and get..
public String view(){
System.out.println(this.map); //打印不出shr属性
return "";}
}
public class TestAction{
public Map<string,string> map = new HashMap<string,string>();
public String view(){
System.out.println(this.map); //打印不出shr属性
return "";}
}
http://localhost:9999/ta/aa/test.do?map.shr=feng
改为:
http://localhost:9999/ta/aa/test.do?map[shr]=feng