ajax통신 xml, json 형식으로 통신이 가능하다
에러발생
해결
ajax통신중에 에러가 발생하는데, 소스상으로 아무리 찾아도 문제 없어 보여서
ajax페이지를 직접 확인해보니 위와같은 에러가 발생하고 있었다
처음보는 에러라서 구글링 한 결과 아래 블로그에서 에러 해결 도움을 받았다
https://www.happyjung.com/lecture/2596
ajax통신할때 어려가지 이유로 에러가 발생하는거 같은데
저같은경우는 내용에 특수문자가 들어가서 발생한 문제 였다
특수문자를 HTML코드로 replace해서 해결을 했다(ex. &->&, \->", <-><, >->> )
replaceAll("&"", "&");
***많이 볼꺼같은 에러코드를 모아봤다***
1. XML 문서 최상단에 공백이 포함된 경우
에러코드
This page contains the following errors:
error on line 2 at column 6: XLM declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
6. StartTag: invalid element name (태그앞에 공백이 있는 경우)
에러코드
This page contains the following errors:
error on line 1483 at column 27: StartTag: invalid element name
Below is a rendering of the page up to the first error.
7. EntityRef: expecting (내용에 특수문자가 있는 경우)
에러코드
This page contains the following errors:
error on line 4 at column 33: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.
'코딩 > WEB' 카테고리의 다른 글
톰캣 로그 실시간으로 확인 (리눅스, 윈도우) (0) | 2023.11.09 |
---|---|
용량 큰 catalina log 확인하기 (0) | 2023.09.20 |