Context initialization and startup

So far, we've seen how a web application's resources may be retrieved, how a brand new Tomcat-specific protocol to access these resources is defined, and how Tomcat implements its own class loader. Rest assured that the hard part is over, and it's all going to be coasting downhill from here.

Our focus now shifts to starting up the context, its children, and other nested components.

As we have seen in the last chapter, a HostConfig instance deploys the web applications associated with its host. For instance, its deployDescriptors() method enumerates the context fragments that it finds in the CATALINA_BASE/conf/Catalina/localhost folder, deploying each in turn.

Each context fragment is deployed to a context path that ...

Get Tomcat 6 Developer's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.