jsp页面添加标签 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
后台存储字符串时存储String val = “java” + “\r\n” + “xxx”;
jsp处理:
<% request.setAttribute("vEnter", "\r\n"); %> ${fn:replace(item.val, vEnter, "<br/>")} 或者 ${fn:replace(item.val, vEnter, "")}