We usually get a se开发者_C百科rvlet-api.jar along with web/app server.
- Does each one have its own implementation of servlet JSR or will they use SUN provided API?
- Is this applicable to all other J2EE API's (EJB, JMS, MAIL)?
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.
精彩评论