Skip to content Skip to sidebar Skip to footer

How To Unescape HTML In Struts2

I have saved some basic HTML in a database. This HTML is via ValueStack in Action class redisplayed as in JSP file. However, the HTML cod

Solution 1:

The <s:property> tag has an escapeHtml attribute which is true by default.

<c:out> is part of the JSTL, and you use it in S2 like in any other web app, with the caveat that it's because of an S2 request wrapper you can use JSP EL to access the value stack.


Solution 2:

I came across the question through Google and found adding the escapeHtml="false" attribute caused the JSP to stop displaying. What worked instead was simply escape="false.


Post a Comment for "How To Unescape HTML In Struts2"