在jsp中执行HTML标记,来自java变量struts 2

时间:2015-06-25 08:50:52

标签: java html jsp struts2

我的java代码中有html标签的字符串数组列表, 作为一个例子就像这样

<li><input type="checkbox"><label>View_A</label>
<ul><li><input type="checkbox"><label>View_B</label></ul>

我希望将其发送到我的jsp并将其作为HTML代码执行 我使用了struts迭代器

<s:iterator value="codeArr" status="statusVar">
     <s:property/><br>
</s:iterator>

但使用此代码将在网页上打印,我想打印HTML列表

也试试 <s:property escapeHtml="false"/> 使用此代码异常将抛出

我该怎么做

0 个答案:

没有答案