Package io.milton.servlet
Class StaticResourceFactory
java.lang.Object
io.milton.servlet.StaticResourceFactory
- All Implemented Interfaces:
ResourceFactory
Used for providing simple readonly access to resources which are files in a
conventional file system.
Can be provided with a single or multiple root directories. If multiple they
are searched in turn for a matching resource
Will check for a system property static.resource.roots which, if present, is
expected to be a comma delimited list of absolute paths to root locations. An
exception will be thrown if a path is given which does not exist
- Author:
- brad
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResource(String host, String url) getRoots()voidsetContextPath(String contextPath) voidsetModDate(Date modDate)
-
Field Details
-
FILE_ROOTS_SYS_PROP_NAME
- See Also:
-
-
Constructor Details
-
StaticResourceFactory
public StaticResourceFactory() -
StaticResourceFactory
-
StaticResourceFactory
-
-
Method Details
-
getResource
- Specified by:
getResourcein interfaceResourceFactory
-
getContextPath
-
setContextPath
-
getModDate
-
setModDate
-
getRoots
-