티스토리 뷰

반응형

java.lang.IllegalArgumentException: The expression [${fn:replace(comment.PRO_CONTN, br, '\r\n')}] is not valid.

 Within a quoted String only [\], ['] and ["] may be escaped with [\].

 

[Wrong]

<%
    //치환 변수 선언
    pageContext.setAttribute("crcn", "\r\n"); 
    pageContext.setAttribute("br", "<br>"); 
%>
<textarea name="commentDetails" rows="2">
<c:out escapeXml="false" value="${fn:replace(comment.PRO_CONTN, br, "\r\n")}"/>
</textarea>

[Right]

<%
    //치환 변수 선언
    pageContext.setAttribute("crcn", "\r\n"); 
    pageContext.setAttribute("br", "<br>"); 
%>
<textarea name="commentDetails" rows="2">
<c:out escapeXml="false" value="${fn:replace(comment.PRO_CONTN, br, crcn)}"/>
</textarea>

 

오류내용상 c태그 벨류 안에 \ 이거 사용안되는거같음 

저렇게 치환하니 ok~~

반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함