title: Understanding who provides servlet-api.jar, is it web-container or part of Java EE download
body: <p>I need understanding about the serlvet-api.jar which is needed to compile a servlet.</p>
  
  <p>I am building a simple servlet, like this:</p>
  
  <pre><code>import javax.servlet.*;
  import javax.servlet.http.*;
  
  public class FirstServlet extends HttpServlet {
      // Remaining code here
  }
  </code></pre>
  
  <p>I know that we need servlet-api.jar file to compile this simple servlet, like this:</p>
  
  <pre><code>javac -classpath /path/where/jar/is/servlet-api.jar
  </code></pre>
  
  <p>Now my doubts starts here:</p>
  
  <ol>
  <li>What is servlet-api.jar?</li>
  <li>Who provides this jar?</li>
  <li>Does each web-container provide this jar e.g., Tomcat, Jboss, glassfish? And does each vendor provide the "same name" to the jar that is needed to build this simple Servlet.</li>
  <li>When we download Java EE , is this jar part of download? OR do we get this file as part of web container?</li>
  <li><p>Consider this situation:</p>
  
  <p>Suppose we compile / build the simple servlet using Tomcat (i.e tomcat's version of jar needed to build the servlet) and create a .war file. Can we then deploy the war in some other vendor container?</p></li>
  </ol>