Package io.milton.servlet
Class WebResourceFactory
java.lang.Object
io.milton.servlet.WebResourceFactory
- All Implemented Interfaces:
ResourceFactory,Initable
Provides access to resources exposed by the servlet context.
Attempts to locate a physical file, via getRealPath. This will usually work,
but may not in cases where the webapp is running from a war file, or if
overlays are used.
If not found it attempts to locate a URL with servletContext.getResource
- Author:
- brad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy(HttpManager manager) getResource(String host, String url) voidinit(Config config, HttpManager manager) voidsetBasePath(String basePath)
-
Constructor Details
-
WebResourceFactory
public WebResourceFactory() -
WebResourceFactory
-
WebResourceFactory
-
-
Method Details
-
init
-
getResource
- Specified by:
getResourcein interfaceResourceFactory
-
destroy
-
getBasePath
-
setBasePath
-