I have a simple text stored in the database record: Hello
wrapped in an h1
tag.
When I print this record in the JSP with the <s:property />
tag, it displays:
<h1>Hello</h1>
While I want it to be displayed like:
Hello
How can I get the interpreted value, instead of the source value ?
You need to set the escapeHtml
attribute of the <s:property/>
tag to false
because, for security reasons, it is true
by default:
<s:property value="myVar" escapeHtml="false" />
Read more on the docs.