Java Code Examples for org.apache.catalina.WebResourceSet#setReadOnly()
The following examples show how to use
org.apache.catalina.WebResourceSet#setReadOnly() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestDirResourceSetReadOnly.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Override public WebResourceRoot getWebResourceRoot() { TesterWebResourceRoot root = new TesterWebResourceRoot(); WebResourceSet webResourceSet = new DirResourceSet(root, "/", getBaseDir().getAbsolutePath(), "/"); webResourceSet.setReadOnly(true); root.setMainResources(webResourceSet); return root; }
Example 2
Source File: TestDirResourceSet.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Override public WebResourceRoot getWebResourceRoot() { TesterWebResourceRoot root = new TesterWebResourceRoot(); WebResourceSet webResourceSet = new DirResourceSet(root, "/", getBaseDir().getAbsolutePath(), "/"); webResourceSet.setReadOnly(false); root.setMainResources(webResourceSet); return root; }
Example 3
Source File: AbstractTestFileResourceSet.java From Tomcat8-Source-Read with MIT License | 5 votes |
@Override public WebResourceRoot getWebResourceRoot() { TesterWebResourceRoot root = new TesterWebResourceRoot(); WebResourceSet webResourceSet = new DirResourceSet(root, "/", getBaseDir().getAbsolutePath(), "/"); webResourceSet.setReadOnly(readOnly); root.setMainResources(webResourceSet); WebResourceSet f1 = new FileResourceSet(root, "/f1.txt", "test/webresources/dir1/f1.txt", "/"); f1.setReadOnly(readOnly); root.addPreResources(f1); WebResourceSet f2 = new FileResourceSet(root, "/f2.txt", "test/webresources/dir1/f2.txt", "/"); f2.setReadOnly(readOnly); root.addPreResources(f2); WebResourceSet d1f1 = new FileResourceSet(root, "/d1/d1-f1.txt", "test/webresources/dir1/d1/d1-f1.txt", "/"); d1f1.setReadOnly(readOnly); root.addPreResources(d1f1); WebResourceSet d2f1 = new FileResourceSet(root, "/d2/d2-f1.txt", "test/webresources/dir1/d2/d2-f1.txt", "/"); d2f1.setReadOnly(readOnly); root.addPreResources(d2f1); return root; }