| base | The base directory or resource from where to serve content. |
| directoriesListed | List directories or not. |
| minMemoryMappedContentLength | Control memory mapped size. |
| resourceType | The type of resource, FILE or CLASSPATH. |
| welcomeFiles | List of welcome files to serve. |
| Example 1 | Serve files from the same directory the configuration file is in. |
| Example 2 | Serves files but also provides a list of welcome files. |
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No, but pointless without one. |
The base directory or resource from where to serve content.
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No, defaults to false. |
List directories or not.
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No. |
Control memory mapped size. Set to -1 on windows because of This issue
This property was deprecated, and then removed in version 10. The link above no longer exists so we assume this has been fixed. This property now does nothing and will be removed in Oddjob 1.8.
| Configured By | ATTRIBUTE |
| Access | READ_WRITE |
| Required | No, defaults to FILE. |
The type of resource, FILE or CLASSPATH.
| Configured By | ELEMENT |
| Access | READ_WRITE |
| Required | No. |
List of welcome files to serve.
Serve files from the same directory the configuration file is in.
<oddjob id="this">
<job>
<web:server id="server" xmlns:web="oddjob:web">
<handler>
<web:resource directoriesListed="true" base="${this.dir}"/>
</handler>
</web:server>
</job>
</oddjob>
Serves files but also provides a list of welcome files.
<oddjob id="this">
<job>
<web:server id="server" xmlns:web="oddjob:web">
<handler>
<web:resource base="${this.dir}">
<welcomeFiles>
<value value="TestFile.txt"/>
</welcomeFiles>
</web:resource>
</handler>
</web:server>
</job>
</oddjob>