struts2 - How to display HTML markup content from database record to browser properly in Struts 2? -


i have simple text stored in database record: hello wrapped in h1 tag.

when print record in jsp <s:property /> tag, displays:

<h1>hello</h1> 

while want displayed like:

hello

how can interpreted value, instead of source value ?

you need set escapehtml attribute of <s:property/> tag false because, security reasons, true default:

<s:property value="myvar" escapehtml="false" /> 

read more on docs.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -