我有一个带有标签的jsp页面:
<logic:iterate id="var" ...
....
<bean:write name="var" property="p1" ...
etc.
而且我需要在每次迭代中生成一个由各种 bean 的属性组成的 href。我什至需要对其中的一些进行 URLEncode 以便链接有效。
就像是
<logic:iterate id="var" ...
....
<html:link action="otheraction.do?_X_
<bean:write name="var" property="p1" ...
etc
其中X是通过收集 bean 的属性生成的;就像是
String X="p1="+URLEncode(p1)+"&p2="+SimpleDateFormatof(p2)+"&p3="+p3;
我怎样才能做到这一点 ?
提前致谢。