The invention provides a system and method for providing virtual
directories for servlets, particularly for use by many different Web
applications that share common files and resources, and that are intended
for providing those resources to large numbers of users. Virtual
directories provide a mechanism for automatically changing the root
folder from the default Web application (webapp) root document folder
(docroot) to a virtual directory or folder, in response to certain
http/URL requests. The purpose of the feature is to allow the developer
to configure different document roots for certain requests. By doing this
they can direct certain kind of requests (particularly those for common
resources) to a common document root. Virtual directories ensure that
common resources do not have to be copied for all web applications
separately, and the burden on the server itself is minimized.