O'Reilly logo

JavaServer Faces by Hans Bergsten

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Web Containers and Servlet Contexts

The WAR file is deployed to what’s called a web container. A web container provides the runtime environment for a Java web application. For instance, it translates request and response data between the raw protocol format and the Java object representations the web application works with and maintains shared resources (such as database connection pools and logfiles). All web containers provide tools for installing a WAR file, or a special directory where a WAR file is automatically picked up (such as the webapps directory in Tomcat). Most containers also support web applications deployed directly in a filesystem using the same file structure as is defined for the WAR file, which can be convenient during development.

There are many different types of web containers. Some containers are called add-ons, or plug-ins, and are used to add support for Java web applications to regular web servers (such as Apache and IIS). They can run in the same operating-system process as the web server or in a separate process. Other containers are standalone servers. A standalone server includes web server functionality to provide full support for HTTP in addition to the web application runtime environment. Containers can also be embedded in other servers, such as a climate-control system, to offer a web-based interface to the system. A container bundled as part of an application server typically distributes the execution over multiple hosts and can provide fail-over ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required