在struts中,我用<bean:write>从数据库中读出数据,如何把这些数据加到<html:link>中的paramProperty变量呢
在struts中,我用 <bean:write> 从数据库中读出数据,
如何把这些数据加到 <html:link> 中的paramProperty变量呢
比如:
我通过:logic:iterate 循环
<logic:iterate id= "line_1 " name= "manage_db_line_list ">
<bean:write name= "line_1 " property= "line_name " />
<logic:iterate>
得到line_name的数值
我想把line_name的数值放到以下html:link的name中我该如何做呢
<html:link href= "test.jsp " paramName= "linkObject " paramId= "realName " paramProperty= "name " paramScope= "request ">
请高手帮忙
------解决方案--------------------加上这句 <bean:define id= "param " name= "line_1 " property= "line_name " />
然后
<html:link href= "test.jsp " paramName= "linkObject " paramId= "realName " paramProperty= " <%=param.toString()%> " paramScope= "request "/>
运行成功记得回来结帖啊~~
------解决方案--------------------直接在link标签里用bean:write
name= " <bean:write name= "line_1 " property= "line_name " /> "
如果struts标签不好用,就换普通HTML标签,应该没问题