This took me a bit to figure out so I thought I’d post it.
Say you’re using JSF and want to conditionally print some HTML tags in your Facelet that could, technically speaking, result in non well-formed markup. You can’t really do it. Printing something like is illegal as it’ll complain about the < and > characters being in there. Using the tag doesn’t work either, even if you wrap the content in a CDATA element. Problem is that it’s preventing you from writing non well-formed markup in any which way.
One of the solutions is to force the rendering kit to not analyze the output for “well-formedness” by passing the HTML markup in a variable.
In your facelet.xhtml
<h:outputText escape="false"
rendered="#{someCondition}"
value="#{messages['lessThan'].concat('ul').concat(messages['greaterThan'])}"/>
In messages.properties
lessThan=< greaterThan=>