// Content root be the first be search.
WebComActivator hostBundleActivator = FwkRuntime.getInstance()
.getHostBundleActivator();
if (hostBundleActivator != null) {
for (int i = 0; i < reps.size(); i++) {
DefinesRoot root = reps.get(i);
if (hostBundleActivator.getBundle().equals(
root.getSourceBundle())) {
if (root.getResources().size() == 1) {
if (root.getResources().get(0).getPath()
.equals(
hostBundleActivator
.getWebContextPath())) {
DefinesRoot tmp = reps.get(0);
reps.set(0, root);
reps.set(i, tmp);
break;
}
}
}
}
}
boolean hostWebRootProecessed = false;
Iterator<DefinesRoot> it = reps.iterator();
while (it.hasNext()) {
DefinesRoot curResRoot = it.next();
// Buffer the context bundle to thread local variant map.
Bundle contextBundle = curResRoot.getSourceBundle();
threadScope.get().put(RESPONSE_CUR_BUNDLE, contextBundle);
// Get the resource visit controller and judge the
// authority.
IResourceVisitController controller = curResRoot
.getVisitControler();
// Buffer the current Resource Define Root to thread local
// variant map. Do not
// need to judge null.