What would be right EL expression in JSP to have a new line or HTML's <br/>
?
Here's my code that doesn't work and render with '\n' in text.
<af:outputText value="#{msg.TCW_SELECT_PART_ANALYSIS}\n#{msg.TCW_SELECT_PART_ANALYSIS2}"/>
What would be right EL expression in JSP to have a new line or HTML's <br/>
?
Here's my code that doesn't work and render with '\n' in text.
<af:outputText value="#{msg.TCW_SELECT_PART_ANALYSIS}\n#{msg.TCW_SELECT_PART_ANALYSIS2}"/>
Since you want to output
<br />
, just do:The attribute
escape="false"
is there to avoid the<br />
being HTML-escaped.You can even display the two messages in separate tags and put the
<br />
in plain text between them.If you're still on JSF 1.1 or older, then you need to wrap plain HTML in
<f:verbatim>
like:How about:
(i.e. split the value and put the character you want between the two)?
If you want a new line in the browser then you need to put "
<br/>
" in the text. The browser will then interpret it correctly. It does not understand \n.Write a custom function that calls this piece of code: