-
Book Overview & Buying
-
Table Of Contents
Java Web Internals
By :
Now that we have a project ready to run inside SimpleWebContainer, that is, an external project whose classes can be "copied" or "installed" in the respective SWC folders, how can it manage all of this so that it knows exactly which classes to run from the respective URL paths?
Here we need to organize the solution architecture a little. To do so, we will illustrate it in the following image:

Figure 5.1: Simple web container initial architecture
This architecture is very similar to the one defined in the previous chapter, but here we add a new component: the Servlet Discover Service. This service is responsible for searching the folder designated for dynamic content (in this case, represented by /webapps/WEB_FOLDER) for all classes that extend the SimpleServlet class when the SWC is started.
The strategy adopted for this discovery is simple and uses an on-demand operation.
Initially, a table (a Hash Map) is created where the...