Serializable, javax.servlet.Servlet, javax.servlet.ServletConfigpublic final class StaticContentServlet extends HttpServlet
setRoot(java.io.File),
Serialized Form| Constructor | Description |
|---|---|
StaticContentServlet() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
|
protected long |
getLastModified(javax.servlet.http.HttpServletRequest request) |
|
void |
init() |
|
void |
setRoot(File root) |
Configures the file system
root for this servlet. |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, loginit@InitParam(name="root") public void setRoot(File root)
root for this servlet.
If root is a directory, files will be served relative to the directory.
If root is a file, only this file may be servedroot - the file system root.public void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected long getLastModified(javax.servlet.http.HttpServletRequest request)
getLastModified in class javax.servlet.http.HttpServletprotected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
doGet in class javax.servlet.http.HttpServletIOExceptionCopyright © 2018. All rights reserved.