I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using
This does not work for me:
${fn:replace(data, newLine, "; ")}
This does:
<% pageContext.setAttribute("newLineChar", "\n"); %> ${fn:replace(item.comments, newLineChar, "; ")}