Applications built using the Struts framework are, at their core, web applications. A web application is a collection of individual components that, once bound together, form a complete application that can be installed and executed by a web container. The components are tied together because they reside in the same web context, which permits them to refer to one another, directly or indirectly. For example, if you have an application running in a web container under a directory called storefront, all of the files in that directory and the directories below it are considered part of the Storefront web application. Any reference to a resource with the "storefront" prefix is routed to this web application. So, if a user types http://www.somehost.com/storefront/index.jsp into his browser's location bar, the JSP page will be served from the root of the Storefront web application.
A web application can be installed and executed in multiple web containers concurrently. For that matter, multiple instances of the same web application can be installed in the same web container. However, because of the manner in which URLs are matched to web applications, each web application must have a unique name within the web container. This means that you can't have two web applications running in the same web container using the same name. The next section takes a closer look at exactly what types of components can reside in a web application.
4.2.1 Elements of a Web Application
Not all web applications are created equal. They will not have the same functional and nonfunctional requirements across organizations and departments, or even the same vertical markets. Therefore, not all web applications will contain the same types of resources. In general, however, web applications can consist of one or more of the following types of components: