Web container

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Web container (also known as a Servlet container) is the component of a web server that interacts with Java servlets. A web container is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet and ensuring that the URL requester has the correct access rights.

A Web container handles requests for servlets, JavaServer Pages (JSP) files, and other types of files that include server-side code. The Web container creates servlet instances, loads and unloads servlets, creates and manages request and response objects, and performs other servlet management tasks.

The Web server plug-ins, provided by the WebSphere Application Server, help supported Web servers pass servlet requests to Web containers. If the property to start servlets during application server startup is enabled, part of its startup process calls the Servlet.init method on its servlets when you start the Web container. Therefore, when the Web container starts and calls the init method, other components such as Naming and Work Load Management may not be fully started yet. As a result, application server related calls may not work since all of the application server components may not be ready yet. Once the application server is 'ready for e-business', it is completely ready. If application server related calls fail during Servlet.init method, you can either:

1-Start the servlet manually when the server is ready for e-business instead of starting the servlet upon startup or
2-You can choose not to make application server related calls in the servlet's init method.
A web container implements the web component contract of the Java EE architecture, specifying a runtime environment for web components that includes security, concurrency, lifecycle management, transaction, deployment, and other services. A web container provides the same services as a JSP container as well as a federated view of the Java EE platform APIs.[citation needed]

List of Servlet containers[edit]

The following is a list of applications which implement the Java Servlet specification from Sun Microsystems, divided depending on whether they are directly sold or not.

Non-commercial Web containers[edit]

Commercial Web containers[edit]