class StaticFileHandler extends java.lang.Object
| Constructor and description |
|---|
StaticFileHandler
(java.lang.String urlPrefix, java.lang.String filesystemRoot, java.lang.String directoryIndex)
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
urlPrefix - The prefix of all URLs.
This is the first argument to createContext. Must start and end in a slash.filesystemRoot - The root directory in the filesystem.
Only files under this directory will be served to the client.
For instance "./staticfiles".directoryIndex - File to show when a directory is requested, e.g. "index.html".Create and register a new static file handler.
hs - The HTTP server where the file handler will be registered.path - The path in the URL prefixed to all requests, such as "/static/"filesystemRoot - The filesystem location.
For instance "/var/www/mystaticfiles/".
A request to "/static/x/y.html" will be served from the filesystem file "/var/www/mystaticfiles/x/y.html"directoryIndex - File to show when a directory is requested, e.g. "index.html".