In my JSP file, I have a string coming from my Java file which reads value= "Set ${value}", I have another string which stores HTML code called htmlVal. When I print htmlVal by itself it renders the HTML code as expected, but when I do value.replace("${value}, htmlVal) it prints out the html code instead. What could be the reason for this and how to render it correctly?
I tried <c:out value=${newString} escapeXml="false"/>