Invocation invocation = (Invocation) servletInvocation;
String contextURI = invocation.getContextURI();
DependencyContainer dependencyList = new DependencyContainer();
WebApp webApp = (WebApp) _webApp;
String uriRealPath = webApp.getRealPath(contextURI);
Path contextPath = webApp.getRootDirectory().lookup(uriRealPath);
if (! contextPath.isDirectory())
return;
ArrayList<String> welcomeFileList = webApp.getWelcomeFileList();
for (int i = 0; i < welcomeFileList.size(); i++) {
String file = welcomeFileList.get(i);
String realPath = webApp.getRealPath(contextURI + "/" + file);
Path path = webApp.getRootDirectory().lookup(realPath);
dependencyList.add(new Depend(path));
}
dependencyList.clearModified();
invocation.setDependency(dependencyList);
}