views:

34

answers:

1

We usually get servlet-api.jar along with web/app server. So does it mean each one have it's own implementation of servlet JSR or will they use SUN provided api. Does this applicable to all other J2ee API's like EJB JMS MAIL

Thanks, Student

+2  A: 

Like as the remnant of the whole Java EE API, the Servlet API is abstract. Sun Oracle doesn't provide any code. The contract is definied on paper (API specification, javadocs, etc). The implementors have to provide the concrete API and implementation themselves which comply the specs/javadocs. But there's usually a so called "reference implementation" whose code may be shared/reused/forked for other implementations. Until with Servlet 2.5, this used to be Apache Tomcat. For Servlet 3.0 this is Glassfish.

BalusC
I don't like the strike-through :P :) also, I think they do provide the interfaces in one jar, don't they? (+1)
Bozho
@Bozho: Me neither :) The interface classes (no source files!) were only public availabe until with version 2.2. See also [this archive](http://java.sun.com/products/servlet/reference/api/index.html).
BalusC