eclipse 또는 STS에서 spring legacy 프로젝트를 생성 후 web.xml에 무언가를 설정하려 하면 자동완성이 잘 되지 않아 난감할 때가 있다.
어느덧 자동완성에 익숙해진 우리는 이런 경우 손가락이 멈춰버리게 된다.
schema의 변경
원인은 web.xml에서 사용하는 namespace들의 값과 schema location이 변경되었기 때문이다.
root element인 web-app을 아래와 같이 변경한다.
<!--before -->
<web-app
version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
https://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
<!--after-->
<web-app
version="4.0"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
id="WebApp_ID"
>
이제 반가운 팝업을 다시 확인할 수 있다.