struts2返回到JSP页面的html字符串如何在JSP页面上解析成html标签 (ognl表达式)

来源:互联网 发布:linux c debug 编辑:程序博客网 时间:2024/06/06 07:15
标签里需要加一个属性escape="false"才能把html字符串解析成html标签<s:property>标签的escape属性默认值为true,即不解析html代码,直接将其输出。
若想要输出html的效果,则要改为false
 
eg:
pageNoList 的值为:<p style="color:red;">hello</p>
 
<s:iterator value="page.pageNoList">       <s:property escape="false"/>               </s:iterator>
 
输出效果为:hello
0 0