First, Introduction
A jar package that supports Servlets. It should be called Servlet-api.jar.
If you write a servlet, you know that objects such as httpservletrequest and HttpServletResponse are used by this jar package.
If you have Tomcat installed, this jar package is typically under the Tomcat installation directory \lib folder, and when you deploy the Web project to Tomcat, it will automatically load the jar to identify some Serlvet objects.
Second, the difference
Both of these artifacts are the Servlet-specificatoin Jar (Servlet specification package), except because of the version upgrade:
The Servlet API component before 3.1 is called Servlet-api-xxx.jar
3.1 and after the servlet API widget renamed to Javax.servlet-api-xxx.jar
In the Maven official warehouse you can see:
To the Maven official warehouse query Javax.servlet this group
Javax.servlet-api-xxx.jar and Servlet-api are located under the same group.
- View Servlet-api page of this widget
Red circle, I know, servlet-api-xxx This component name has been renamed to Javax.servlet-api-xxx, group has not changed, Servlet-api-xxx last version was released in 2008 3.0-alpha-1.
Javax.servlet-api-xx.jar and Servlet-api.jar differences