anchor.diff:  In this document, web requests are considered to be HTTP requests. [small]#(The specification is more general but I doubt anybody would seriously consider writing non HTTP servlets in a Java EE application server.)#
   
   == Servlets in Java EE
  +
  +=== My first web project
  +To start a Maven compatible web project, create a new folder, use https://github.com/oliviercailloux/samples/blob/master/JavaEE-Servlets/pom.xml[this] sample pom, then import the project into Eclipse.
   
   === My first servlet
   For you to define a new servlet that will be recognized as such by the container, you must define a new class that represents your servlet, and:
  
positive.code: == Test servlets from command line
  Once you have written your servlet, you want to easily test it. See link:HTTP.adoc#curl[HTTP].
  
  == Refs
  * Servlet 3.1 (JSR 340) specification: http://download.oracle.com/otn-pub/jcp/servlet-3_1-fr-eval-spec/servlet-3_1-final.pdf[PDF]
  
  == Supplementary details
  
  
negative.code: 
  This document gives a (rough and incomplete) overview of Servlets in Java EE application servers. This document may serve as an introduction to application servers in Java EE.
  
  NOTE: The reader supposedly has basic knowledge of link:HTTP.adoc[HTTP], link:Maven.adoc[Maven] and link:Glassfish.adoc[application servers]. (You are not obliged to use Glassfish, though.)
  
  == Overview
  A servlet is a piece of software that, given some web request parameters, returns some response to the request. You, the web application developer, write the code that, given the request parameters, computes the response. That code gets embedded into the “web” container of your application server.
  
  The web container is one of the containers provided by any Java EE compliant application server. The web container listens for web requests on some port and will call your servlet code whenever it detects a web request directed to your servlet. The Java servlet specification also defines how to tell the application server which web requests should be sent to your servlet code.
  