我有一个网址,像这样localhost:8080/foo.action?param1=7¶m2=8¶m3=6
当这是 URL(原样)时,request.getParmeter("param2")
给我8
[正确]
i) 当编码将此 url 转换为localhost:8080/foo.action?param1=7%26param2=8%26param3=6
在这种情况下,request.getParameter("param1")
给我7¶m2=8¶m3=6
ii) 当编码将此 url 转换为localhost:8080/foo.action?param1=7&param2=8&param3=6
在这种情况下,request.getParameter("param1")
给我7
并request.getParameter("param2")
给我 null
检索参数的正确方法是什么?[假设使用两种Url编码方案中的一种是不可避免的]
(我正在使用 struts 动作)