Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

servlets

jar

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. Apologies. I should have listed the content of the wordpad output when I double clicked on the MANIFEST.MF file in the jar I got:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)

As you can see it didnt tell me the version hence the question.

like image 717
volvox Avatar asked Oct 12 '10 10:10

volvox


1 Answers

use the below code snippet :

<%= session.getServletContext().getMajorVersion() %>.
<%= session.getServletContext().getMinorVersion() %>
like image 98
Ravi.Kumar Avatar answered Sep 22 '22 04:09

Ravi.Kumar