Package it.unimi.di.big.mg4j.query
Class FileSystemItem
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- it.unimi.di.big.mg4j.query.FileSystemItem
-
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
public class FileSystemItem extends HttpServlet
An item serving a file from the file system.This kind of
QueryServlet
item will load into the browser the file specified by the parameteruri
. Its only purpose is to work around security problems that forbid in some browsers (e.g., Firefox) to link a file in the file system from a page retrieved from an HTTP server.When this class is loaded, it creates the singleton
HttpFileServer
and caches it to avoid class garbage collection.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileSystemItem()
-
Method Summary
Modifier and Type Method Description protected void
doGet(HttpServletRequest request, HttpServletResponse response)
protected void
doPost(HttpServletRequest request, HttpServletResponse response)
void
init()
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Method Detail
-
init
public void init()
- Overrides:
init
in classGenericServlet
-
doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException
- Overrides:
doGet
in classHttpServlet
- Throws:
IOException
-
doPost
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException
- Overrides:
doPost
in classHttpServlet
- Throws:
IOException
-
-