How do I know what version of servlet-api.jar I have?

后端 未结 5 1371
一个人的身影
一个人的身影 2021-01-02 02:49

I downloaded a copy of servlet-api.jar from java2s.com. How do I know what version it is? There\'s no reference on the site.

EDIT

Ah. Apo

5条回答
  •  时光说笑
    2021-01-02 03:44

    you can extract the MANIFEST.MF from the META-INF directory of your jar file by using

    jar xf servlet-api.jar META-INF/MANIFEST.MF
    

    the manifest for version 2.4 that comes with tomcat looks like this for example

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.4.2_06-b03 (Sun Microsystems Inc.)
    
    Name: javax/servlet/
    Specification-Title: Java API for Servlets
    Specification-Version: 2.4
    Specification-Vendor: Sun Microsystems, Inc.
    Implementation-Title: javax.servlet
    Implementation-Version: 2.4.public_draft
    Implementation-Vendor: Apache Software Foundation
    

提交回复
热议问题