use of org.apache.catalina.WebResourceSet in project tomcat by apache.
the class TestDirResourceSet method getWebResourceRoot.
@Override
public WebResourceRoot getWebResourceRoot() {
TesterWebResourceRoot root = new TesterWebResourceRoot();
WebResourceSet webResourceSet = new DirResourceSet(root, "/", getBaseDir().getAbsolutePath(), "/");
webResourceSet.setReadOnly(false);
root.setMainResources(webResourceSet);
return root;
}
use of org.apache.catalina.WebResourceSet in project tomcat by apache.
the class TestDirResourceSetInternal method getWebResourceRoot.
@Override
public WebResourceRoot getWebResourceRoot() {
TesterWebResourceRoot root = new TesterWebResourceRoot();
WebResourceSet webResourceSet = new DirResourceSet(root, "/", tempDir.toAbsolutePath().toString(), "/dir1");
root.setMainResources(webResourceSet);
return root;
}
use of org.apache.catalina.WebResourceSet in project tomcat by apache.
the class TestDirResourceSetReadOnly method getWebResourceRoot.
@Override
public WebResourceRoot getWebResourceRoot() {
TesterWebResourceRoot root = new TesterWebResourceRoot();
WebResourceSet webResourceSet = new DirResourceSet(root, "/", getBaseDir().getAbsolutePath(), "/");
webResourceSet.setReadOnly(true);
root.setMainResources(webResourceSet);
return root;
}
use of org.apache.catalina.WebResourceSet in project tomcat by apache.
the class TestDirResourceSetVirtual method getWebResourceRoot.
@Override
public WebResourceRoot getWebResourceRoot() {
TesterWebResourceRoot root = new TesterWebResourceRoot();
WebResourceSet webResourceSet = new DirResourceSet(new TesterWebResourceRoot(), "/", getBaseDir().getAbsolutePath(), "/");
root.setMainResources(webResourceSet);
WebResourceSet f1 = new FileResourceSet(root, "/f1.txt", dir1.getAbsolutePath() + "/f1.txt", "/");
root.addPreResources(f1);
WebResourceSet f2 = new FileResourceSet(root, "/f2.txt", dir1.getAbsolutePath() + "/f2.txt", "/");
root.addPreResources(f2);
WebResourceSet d1 = new DirResourceSet(root, "/d1", dir1.getAbsolutePath() + "/d1", "/");
root.addPreResources(d1);
WebResourceSet d2 = new DirResourceSet(root, "/d2", dir1.getAbsolutePath() + "/d2", "/");
root.addPreResources(d2);
return root;
}
use of org.apache.catalina.WebResourceSet in project tomcat by apache.
the class StandardRoot method startInternal.
@Override
protected void startInternal() throws LifecycleException {
mainResources.clear();
main = createMainResourceSet();
mainResources.add(main);
for (List<WebResourceSet> list : allResources) {
// Skip class resources since they are started below
if (list != classResources) {
for (WebResourceSet webResourceSet : list) {
webResourceSet.start();
}
}
}
// This has to be called after the other resources have been started
// else it won't find all the matching resources
processWebInfLib();
// Need to start the newly found resources
for (WebResourceSet classResource : classResources) {
classResource.start();
}
cache.enforceObjectMaxSizeLimit();
setState(LifecycleState.STARTING);
}
Aggregations