Skip to content Skip to sidebar Skip to footer

Writing Html In A String

I'm trying a write a couple small lines of html in my java class that gets some data from another API. I get the data in a JSON string, and would then like to display some of it on

Solution 1:

Seems like you're using JSF. Try this:

<divid="display"><h:outputTextvalue="#{PortalView.fullLeadData}"escape="false"/></div>

Solution 2:

You may need to replace the escape sequences. The common ones being

‘&’ (ampersand)  ‘&amp;‘
‘"’ (double quote)  ‘&quot;‘
”’ (single quote)  ‘&#039;‘
‘<’ (less than)  ‘&lt;‘
‘>’ (greater than)  ‘&gt;

Post a Comment for "Writing Html In A String"