tomcat을 사용할때 버전이 바뀔 때 관련 항목들도 다 같이 수정해야 된다.

http://tomcat.apache.org/whichversion.html

 

Apache Tomcat® - Which Version Do I Want?

Apache Tomcat® is an open source software implementation of a subset of the Jakarta EE (formally Java EE) technologies. Different versions of Apache Tomcat are available for different versions of the specifications. The mapping between the specifications

tomcat.apache.org

이곳에서 확인이 가능하다

 

서블릿 사양은 4.0인데 3.1을 사용해서 그런 것 같다

 

해당 프로젝트의 .settings 파일에 들어간다

 

.settings에 보면 해당 xml이 보일것이다.

이 부분을 내려도 되지만 지금은 위에 사양이기 때문에 3.1로 설정해둔 web.xml의 버전을 4.0으로 올려본다.

 

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
    version="4.0">

4.0은 해당 코드를 사용한다.

 

에러가 없어진 것을 확인할 수 있다!

 

+ Recent posts