The server does not support version 2.5 of the J2EE Web module specification error solution

Running a project in myEclipse gave this error:

        The server does not support version 2.5 of the J2EE Web module specification

Reason: The specification of servlet 2.5, or new features, is used, and then you run on a web container that does not support 2.5, this error will occur. Solution:
Change the specification in web.xml to 2.4, or publish it to the corresponding tomcat version (see the bottom picture).

    ps: The eyes are really,,, hey, I'm wrong, I've been looking for the wrong thing for a long time. . . .


Right-click on your project, click the first property property, go to the following path where your project is saved, and find the settings file, as shown in the figure:



Right-click the file shown above and open it with Notepad.

As shown below. I used to be 2.5, and now I changed it to 2.4, OK.


The correspondence between tomcat versions and servlets:


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325902018&siteId=291194637