Download Servlet Jar

Based onRelease Date:DVD Release Date:PG-13 2 hr 17 minFollow the movie onand Plot SummaryAfter defeating international terrorist Owen Shaw, Dominic Toretto (Vin Diesel), Brian O'Conner (Paul Walker) and the rest of the crew have separated to return to more normal lives. Download film fast & furious 7 full movie.

Active3 years, 5 months ago

I have jdk1.6.0_13 installed, but when I try to find a javax.servlet package, or press Ctrl+Space in Eclipse after Servlet I cannot get anything. Where can I download this package, and why isn't it included in standard distribution for developers?

Welcome to the Apache Tomcat ® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. The normal procedure with Eclipse and Java EE webapplications is to install a servlet container (Tomcat, Jetty, etc) or application server (Glassfish (which is bundled in the 'Sun Java EE' download), JBoss AS, WebSphere, Weblogic, etc) and integrate it in Eclipse using a (builtin) plugin in the Servers view.

egagaegaga
12.5k9 gold badges41 silver badges55 bronze badges

6 Answers

javax.servlet is a package that's part of Java EE (Java Enterprise Edition). You've got the JDK for Java SE (Java Standard Edition).

You could use the Java EE SDK for example.

Alternatively simple servlet containers such as Apache Tomcat also come with this API (look for servlet-api.jar).

Joachim SauerJoachim Sauer
247k50 gold badges495 silver badges568 bronze badges

A bit more detail to Joachim Sauer's answer:

On Ubuntu at least, the metapackage tomcat6 depends on metapackage tomcat6-common (and others), which depends on metapackage libtomcat6-java, which depends on package libservlet2.5-java (and others). It contains, among others, the files /usr/share/java/servlet-api-2.5.jar and /usr/share/java/jsp-api-2.1.jar, which are the servlet and JSP libraries you need. So if you've installed Tomcat 6 through apt-get or the Ubuntu Software Centre, you already have the libraries; all that's left is to get Tomcat to use them in your project.

Place libraries /usr/share/java/servlet-api-2.5.jar and /usr/share/java/jsp-api-2.1.jar on the class path like this:

  • For all projects, by configuring Eclipse by selecting Window ->Preferences -> Java -> Installed JREs, then selecting the JRE you'reusing, pressing Edit, then pressing Add External JARs, and then byselecting the files from the locations given above.

  • For just oneproject, by right-clicking on the project in the Project Explorerpane, then selecting Properties -> Java Build Path, and then pressingAdd External JARs, and then by selecting the files from the locationsgiven above.

Further note 1: These are the correct versions of those libraries for use with Tomcat 6; for the other Tomcat versions, see the table on page http://tomcat.apache.org/whichversion.html, though I would suppose each Tomcat version includes the versions of these libraries that are appropriate for it.

Further note 2: Package libservlet2.5-java's description (dpkg-query -s libservlet2.5-java) says: 'Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a 'pure Java' HTTP web server environment for Java code to run. This package contains the Java Servlet and JSP library.'

Teemu LeistiTeemu Leisti
3,6112 gold badges24 silver badges36 bronze badges

Download Servlet Jar Files

Have you instaled the J2EE? If you installed just de standard (J2SE) it won´t find.

Decio LiraDecio Lira
1,6461 gold badge17 silver badges24 bronze badges

The normal procedure with Eclipse and Java EE webapplications is to install a servlet container (Tomcat, Jetty, etc) or application server (Glassfish (which is bundled in the 'Sun Java EE' download), JBoss AS, WebSphere, Weblogic, etc) and integrate it in Eclipse using a (builtin) plugin in the Servers view.

During the creation wizard of a new Dynamic Web Project, you can then pick the integrated server from the list. If you happen to have an existing Dynamic Web Project without a server or want to change the associated one, then you need to modify it in the Targeted Rutimes section of the project's properties.

Either way, Eclipse will automatically place the necessary server-specific libraries in the project's classpath (buildpath).

You should absolutely in no way extract and copy server-specific libraries into /WEB-INF/lib or even worse the JRE/lib yourself, to 'fix' the compilation errors in Eclipse. It would make your webapplication tied to a specific server and thus completely unportable.

BalusCBalusC
889k312 gold badges3262 silver badges3295 bronze badges

If you've got the Java EE JDK with Glassfish, it's in glassfish3/glassfish/modules/javax.servlet-api.jar.

fundeadfundead
1,2111 gold badge13 silver badges15 bronze badges

those classes are usually part of servlet.jar
http://www.java2s.com/Code/Jar/wsit/Downloadservletjar.htm

KingInkKingInk

Not the answer you're looking for? Browse other questions tagged javaservlets or ask your own question.

Download Servlet Jar
Active3 years, 10 months ago

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

oneiros

Download Servlet-api.jar For Java 1.8

oneirosoneiros
1,9639 gold badges33 silver badges55 bronze badges

4 Answers

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

Download Http Servlet Jar

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

Oleg MikheevOleg Mikheev
12.9k8 gold badges62 silver badges87 bronze badges

Grab it from here

Servlet Api Jar

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

yatskevichyatskevich

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.

James ClarkJames Clark

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

Babatunde AdeyemiBabatunde Adeyemi
12.7k3 gold badges27 silver badges24 bronze badges

Not the answer you're looking for? Browse other questions tagged servlets or ask your own question.