ERROR/SQL
[web.xml]cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web-app', but this element does not have a simple type.
onlyun
2022. 3. 16. 22:30
[Error 발생]
웹 프로젝트 생성하고 maven update 후에 에러 표시 사라졌음.
근데,
pom.xml에 라이브러리 추가하고 - 자바 버전 변경/서블릿 버전 변경 / 각종 필요한 라이브러리 추가 등등
web.xml에 한글 깨짐 처리 필터 추가하는 과정에서 에러 발생
[Error 내용]
cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web-app', but this element does not have a simple type. |
cvc-id.3: A field of identity constraint 'web-app-filter-name-uniqueness' matched element 'web-app', but this element does not have a simple type. |
└위에 것은 서블릿 버전 변경하면서 생긴 것 같고
└아래 것은 한글 필터 때문에 생긴 것 같음
[해결 방법]
블럭 표시한 부분(…http://java.sun.com/xml…)을
xsi:schemaLocation="http://Java.sun.com/xml/ns/javaee
또는
xsi:schemaLocation="http://JAVA.sun.com/xml/ns/javaee
로 바꾸면 에러 사라짐.