How can I change to correct below code?
<%!
public String renderComment(String comment) {
return comment.replaceAll("<", "<").replaceAll(">", ">").replaceAll("\n", "<br />");
}
%>
<c:forEach var="answer" items="${answerList}" varStatus="status">
<%=renderComment(${answer.cn})%> <!-- This is wrong. -->
<%=renderComment(answer.cn)%> <!-- This is wrong.-->
${renderComment(answer.cn)} <!-- This is wrong, too! How can I do? -->
</c:forEach>
tags – Jaime Dec 01 '15 at 05:43