

Once Catalina has matched a context with a request, the selected Context passes the request to the correct servlet to process the request, based on definitions contained in the web application deployment descriptor file. Tcat lets you save complete server configuration profiles, and apply them to new instances with a single click. Applications can either be stored in a Web Application Archive (WAR) file, in which case they will be dynamically uncompressed as needed, or as organized unpacked resources in a directory.ĭon't do the same Context configuration work twice. The context path, which is contained within the context, specifies where the application's resources can be located. There is no limit to the number of Contexts that can be defined, as long as each Context is given its own unique context path. Once a Context has been defined, Catalina will attempt to match incoming HTTP requests to its context path. For each explicitly configured web application, there should be one context element either in server.xml or in a separate context XML fragment file. A web site is made up of one or more Contexts.


In Tomcat, the Context Container represents a single web application running within a given instance of Tomcat. In this article, we will outline the way that Tomcat uses Contexts to distribute requests to the appropriate servlets, and look at how the methods of defining Contexts vary from one another.
