oneiros
oneiros

Reputation: 3568

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 ?

Upvotes: 35

Views: 119033

Answers (4)

Oleg Mikheev
Oleg Mikheev

Reputation: 17444

Make sure that you're using the same Servlet API specification that your Web container supports. Refer to this chart if you're using Tomcat: http://tomcat.apache.org/whichversion.html

The Web container that you use will definitely have the API jars you require.

Tomcat 6 for example has it in apache-tomcat-6.0.26/lib/servlet-api.jar

Upvotes: 29

Babatunde Adeyemi
Babatunde Adeyemi

Reputation: 14438

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

Upvotes: 2

yatskevich
yatskevich

Reputation: 2093

Grab it from here

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

Upvotes: 13

James Clark
James Clark

Reputation: 1811

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.

Upvotes: 4

Related Questions