[servlets] Where do I get servlet-api.jar from?

In order to write servlets code I need servlet-api.jar. Where do i get servlet-api.jar from ?

This question is related to servlets

The answer is


You may want to consider using Java EE, which includes the javax.servlet.* packages. If you require a specific version of the servlet api, for instance to target a specific web application server, you will probably want the Java EE version which matches, see this version table.


You can find a recent servlet-api.jar in Tomcat 6 or 7 lib directory. If you don't have Tomcat on your machine, download the binary distribution of version 6 or 7 from http://tomcat.apache.org/download-70.cgi


Grab it from here

Just choose required version and click 'Binary'. e.g direct link to version 2.5