Chapter 1. Web application basics 11
Each Web application corresponds to one
ServletContext instance. There is one
ServletContext object per Java Virtual Machine. The ServletContext interface
defines a set of methods to communicate with the servlet container. A handle to
this object can be retrieved by all servlets and JSPs in the application by calling
the getServletContext( ) method. For example, use a ServletContext object to get
the MIME type of a file, dispatch requests, or write to a log file.
1.2.7 Packaging servlets
Similar to a Web application, servlets are packaged into a Web application
archive (WAR). We show you about build the WAR files that contains servlet
classes in later chapters.
To learn more about the Servlet Specificatio ...