서버단으로 String 데이터가 전달될 때 기호, 특수문자가 그대로 오지 않고 변환되어 전달되는 경우가 있다.
그 경우에 사용하는 Apache에서 제공하는 클래스가 있다.
StringEscapeUtils (Apache Commons Lang 3.12.0 API)
Unescapes any Java literals found in the String. For example, it will turn a sequence of '\' and 'n' into a newline character, unless the '\' is preceded by another '\'.
commons.apache.org
참고
[JAVA] HTML, MVC, Servlet 환경에서 특수문자 치환( < > & ...)
안녕하세요. 소다맛사탕 입니다. 오늘은 Servlet 이나 HTML, 그리고 GET, POST 형식을 이용해 URL 주소값을 전달할 때.. 대부분 자바 서버단으로 이동하는 값은 String 형태로 보내지게 되는데, 여기서 기
develop-sense.tistory.com
'공부하자 > 개발 중 이것저것' 카테고리의 다른 글
@Transient 어노테이션 (0) | 2023.09.20 |
---|---|
GROUP BY CASE WHEN 구문 사용 (0) | 2023.08.25 |
react vs. vue 차이점 참고 보기 (0) | 2023.07.24 |
aws 오류 [ com.amazonaws.services.sns.model.EndpointDisabledException: Endpoint is disabled (Service: AmazonSNS; Status Code: 400; Error Code: EndpointDisabled; Request ID: ......) ] (0) | 2023.07.20 |
[Sourcetree]소스트리가 실행이 되지 않을 때 (0) | 2023.07.03 |